[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [kst-plot] src/libkstapp: More HiDPI fixes:
From: Barth Netterfield <netterfield () astro ! utoronto ! ca>
Date: 2016-01-31 22:00:53
Message-ID: E1aQ03B-0006TV-Ha () scm ! kde ! org
[Download RAW message or body]
Git commit 5b55691eb36f762961f53735218da462be77e72b by Barth Netterfield.
Committed on 30/01/2016 at 20:46.
Pushed by netterfield into branch 'master'.
More HiDPI fixes:
Remove some pixel based magic numbers.
M +8 -7 src/libkstapp/labelcreator.cpp
M +60 -43 src/libkstapp/labelcreator.ui
M +7 -6 src/libkstapp/labelpropertiestab.cpp
M +12 -4 src/libkstapp/labeltab.cpp
M +439 -341 src/libkstapp/labeltab.ui
M +7 -6 src/libkstapp/legendtab.cpp
M +7 -4 src/libkstapp/overridelabeltab.cpp
M +71 -73 src/libkstapp/overridelabeltab.ui
M +8 -6 src/libkstapp/themedialog.cpp
http://commits.kde.org/kst-plot/5b55691eb36f762961f53735218da462be77e72b
diff --git a/src/libkstapp/labelcreator.cpp b/src/libkstapp/labelcreator.cpp
index 76295bc..c8e6e5a 100644
--- a/src/libkstapp/labelcreator.cpp
+++ b/src/libkstapp/labelcreator.cpp
@@ -28,16 +28,17 @@ LabelCreator::LabelCreator(QWidget *parent)
: QDialog(parent) {
setupUi(this);
+
setWindowTitle(tr("Create Label Dialog"));
- _bold->setFixedWidth(32);
- _bold->setFixedHeight(32);
+ int h = fontMetrics().lineSpacing();
+ _bold->setFixedWidth(h);
+ _bold->setFixedHeight(h);
_bold->setIcon(KstGetIcon("kst_bold"));
- _italic->setFixedWidth(32);
- _italic->setFixedHeight(32);
+ _italic->setFixedWidth(h);
+ _italic->setFixedHeight(h);
_italic->setIcon(KstGetIcon("kst_italic"));
- _labelColor->setFixedWidth(32);
- _labelColor->setFixedHeight(32);
-
+ _labelColor->setFixedWidth(h);
+ _labelColor->setFixedHeight(h);
_labelText->setObjectStore(kstApp->mainWindow()->document()->objectStore());
QFont font;
diff --git a/src/libkstapp/labelcreator.ui b/src/libkstapp/labelcreator.ui
index f5e6ba6..e595e05 100644
--- a/src/libkstapp/labelcreator.ui
+++ b/src/libkstapp/labelcreator.ui
@@ -52,7 +52,7 @@
</sizepolicy>
</property>
<property name="text">
- <string comment="The left side">Left</string>
+ <string comment="The left side">&Left</string>
</property>
<property name="checked">
<bool>true</bool>
@@ -79,35 +79,6 @@
</item>
<item row="2" column="0" colspan="2">
<layout class="QGridLayout" name="gridLayout">
- <item row="0" column="4">
- <widget class="QPushButton" name="_bold">
- <property name="toolTip">
- <string comment="bold font">Bold</string>
- </property>
- <property name="text">
- <string/>
- </property>
- <property name="checkable">
- <bool>true</bool>
- </property>
- <property name="si" stdset="0">
- <string notr="true">label bold</string>
- </property>
- </widget>
- </item>
- <item row="0" column="3">
- <widget class="QLabel" name="label">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Fixed" vsizetype="Preferred">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string> points</string>
- </property>
- </widget>
- </item>
<item row="1" column="0">
<widget class="QLabel" name="_Label_12">
<property name="sizePolicy">
@@ -143,7 +114,7 @@
<item row="0" column="0">
<widget class="QLabel" name="_Label_11">
<property name="text">
- <string>Font &size:</string>
+ <string>Font si&ze:</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
@@ -153,23 +124,38 @@
</property>
</widget>
</item>
- <item row="0" column="1" colspan="2">
- <widget class="QDoubleSpinBox" name="_labelFontScale">
- <property name="decimals">
- <number>1</number>
+ <item row="0" column="6">
+ <widget class="QPushButton" name="_italic">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
</property>
- <property name="minimum">
- <double>-25.000000000000000</double>
+ <property name="toolTip">
+ <string>Italic</string>
</property>
- <property name="singleStep">
- <double>1.000000000000000</double>
+ <property name="text">
+ <string/>
+ </property>
+ <property name="checkable">
+ <bool>true</bool>
+ </property>
+ <property name="si" stdset="0">
+ <string notr="true">label italic</string>
</property>
</widget>
</item>
<item row="0" column="5">
- <widget class="QPushButton" name="_italic">
+ <widget class="QPushButton" name="_bold">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
<property name="toolTip">
- <string>Italic</string>
+ <string comment="bold font">Bold</string>
</property>
<property name="text">
<string/>
@@ -178,7 +164,39 @@
<bool>true</bool>
</property>
<property name="si" stdset="0">
- <string notr="true">label italic</string>
+ <string notr="true">label bold</string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="4">
+ <widget class="QLabel" name="label">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Fixed" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string> points</string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="1" colspan="3">
+ <widget class="QDoubleSpinBox" name="_labelFontScale">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="decimals">
+ <number>1</number>
+ </property>
+ <property name="minimum">
+ <double>-25.000000000000000</double>
+ </property>
+ <property name="singleStep">
+ <double>1.000000000000000</double>
</property>
</widget>
</item>
@@ -217,7 +235,6 @@
</customwidgets>
<tabstops>
<tabstop>_labelFontScale</tabstop>
- <tabstop>_bold</tabstop>
<tabstop>_labelColor</tabstop>
<tabstop>_family</tabstop>
<tabstop>_saveAsDefault</tabstop>
diff --git a/src/libkstapp/labelpropertiestab.cpp \
b/src/libkstapp/labelpropertiestab.cpp index 82f3c70..69df4ab 100644
--- a/src/libkstapp/labelpropertiestab.cpp
+++ b/src/libkstapp/labelpropertiestab.cpp
@@ -40,14 +40,15 @@ LabelPropertiesTab::LabelPropertiesTab(QWidget *parent)
"Scalar: <i>[V1/Mean]</i>. Vector Element: \
<i>[V1[4]]</i>. "
"Equation: <i>[=[V1/Mean]^2]</i>. A [ character can \
be inserted as <i>\\[</i>."));
- _bold->setFixedWidth(32);
- _bold->setFixedHeight(32);
+ int h = fontMetrics().lineSpacing();
+ _bold->setFixedWidth(h);
+ _bold->setFixedHeight(h);
_bold->setIcon(KstGetIcon("kst_bold"));
- _italic->setFixedWidth(32);
- _italic->setFixedHeight(32);
+ _italic->setFixedWidth(h);
+ _italic->setFixedHeight(h);
_italic->setIcon(KstGetIcon("kst_italic"));
- _labelColor->setFixedWidth(32);
- _labelColor->setFixedHeight(32);
+ _labelColor->setFixedWidth(h);
+ _labelColor->setFixedHeight(h);
connect(_labelText, SIGNAL(labelChanged()), this, SIGNAL(modified()));
connect(_labelFontScale, SIGNAL(valueChanged(double)), this, SIGNAL(modified()));
diff --git a/src/libkstapp/labeltab.cpp b/src/libkstapp/labeltab.cpp
index 88ef7d9..7edff91 100644
--- a/src/libkstapp/labeltab.cpp
+++ b/src/libkstapp/labeltab.cpp
@@ -27,12 +27,20 @@ LabelTab::LabelTab(PlotItem* plotItem, QWidget *parent)
setupUi(this);
+ int h = fontMetrics().lineSpacing();
_globalLabelBold->setIcon(KstGetIcon("kst_bold"));
- _globalLabelBold->setFixedWidth(32);
+ _globalLabelBold->setFixedHeight(h);
+ _globalLabelBold->setFixedWidth(h);
_globalLabelItalic->setIcon(KstGetIcon("kst_italic"));
- _globalLabelItalic->setFixedWidth(32);
- _globalLabelColor->setFixedWidth(32);
- _globalLabelColor->setFixedHeight(32);
+ _globalLabelItalic->setFixedHeight(h);
+ _globalLabelItalic->setFixedWidth(h);
+ _globalLabelColor->setFixedHeight(h);
+ _globalLabelColor->setFixedWidth(h);
+
+ _topLabelText->setFixedHeight(h*4/3);
+ _bottomLabelText->setFixedHeight(h*4/3);
+ _leftLabelText->setFixedHeight(h*4/3);
+ _rightLabelText->setFixedHeight(h*4/3);
setTabTitle(tr("Labels"));
diff --git a/src/libkstapp/labeltab.ui b/src/libkstapp/labeltab.ui
index 526e2a8..98e416d 100644
--- a/src/libkstapp/labeltab.ui
+++ b/src/libkstapp/labeltab.ui
@@ -6,221 +6,447 @@
<rect>
<x>0</x>
<y>0</y>
- <width>630</width>
- <height>364</height>
+ <width>1155</width>
+ <height>621</height>
</rect>
</property>
- <layout class="QGridLayout" name="gridLayout">
- <item row="0" column="0">
- <widget class="QLabel" name="_Label_4">
- <property name="text">
- <string>Default plot font &size:</string>
- </property>
- <property name="alignment">
- <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
- </property>
- <property name="buddy">
- <cstring>_globalLabelFontSize</cstring>
- </property>
- </widget>
- </item>
- <item row="0" column="2" colspan="2">
- <widget class="QDoubleSpinBox" name="_globalLabelFontSize">
- <property name="decimals">
- <number>1</number>
- </property>
- <property name="minimum">
- <double>-25.000000000000000</double>
- </property>
- </widget>
- </item>
- <item row="0" column="4">
- <widget class="QLabel" name="label">
- <property name="text">
- <string>points</string>
- </property>
- </widget>
- </item>
- <item row="0" column="5">
- <widget class="QPushButton" name="_globalLabelBold">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="iconSize">
- <size>
- <width>22</width>
- <height>22</height>
- </size>
- </property>
- <property name="checkable">
- <bool>true</bool>
- </property>
- <property name="si" stdset="0">
- <string notr="true">label bold</string>
- </property>
- </widget>
- </item>
- <item row="0" column="6">
- <widget class="QPushButton" name="_globalLabelItalic">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="iconSize">
- <size>
- <width>22</width>
- <height>22</height>
- </size>
- </property>
- <property name="checkable">
- <bool>true</bool>
- </property>
- <property name="si" stdset="0">
- <string notr="true">label italic</string>
- </property>
- </widget>
- </item>
- <item row="0" column="7">
- <widget class="Kst::ColorButton" name="_globalLabelColor">
- <property name="si" stdset="0">
- <string notr="true">label color</string>
- </property>
- </widget>
- </item>
- <item row="1" column="2" colspan="6">
- <widget class="QFontComboBox" name="_globalLabelFontFamily"/>
- </item>
- <item row="2" column="2" colspan="3">
- <widget class="QCheckBox" name="_autoScaleNumberAxis">
- <property name="text">
- <string>Automatically scale number axis labels</string>
- </property>
- </widget>
+ <layout class="QVBoxLayout" name="verticalLayout">
+ <item>
+ <layout class="QGridLayout" name="gridLayout">
+ <item row="0" column="4">
+ <widget class="QPushButton" name="_globalLabelItalic">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="checkable">
+ <bool>true</bool>
+ </property>
+ <property name="si" stdset="0">
+ <string notr="true">label italic</string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="2">
+ <widget class="QLabel" name="label">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>points</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="1" colspan="7">
+ <widget class="QFontComboBox" name="_globalLabelFontFamily"/>
+ </item>
+ <item row="0" column="1">
+ <widget class="QDoubleSpinBox" name="_globalLabelFontSize">
+ <property name="decimals">
+ <number>1</number>
+ </property>
+ <property name="minimum">
+ <double>-25.000000000000000</double>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="5">
+ <widget class="Kst::ColorButton" name="_globalLabelColor">
+ <property name="si" stdset="0">
+ <string notr="true">label color</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="0">
+ <widget class="QLabel" name="label_3">
+ <property name="text">
+ <string>Font Family:</string>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="3">
+ <widget class="QPushButton" name="_globalLabelBold">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="checkable">
+ <bool>true</bool>
+ </property>
+ <property name="si" stdset="0">
+ <string notr="true">label bold</string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="0">
+ <widget class="QLabel" name="_Label_4">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Default plot font si&ze:</string>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+ </property>
+ <property name="buddy">
+ <cstring>_globalLabelFontSize</cstring>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="7">
+ <widget class="QCheckBox" name="_autoScaleNumberAxis">
+ <property name="layoutDirection">
+ <enum>Qt::LeftToRight</enum>
+ </property>
+ <property name="text">
+ <string>Autoscale axis numbers</string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="6">
+ <spacer name="horizontalSpacer_2">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ </layout>
</item>
- <item row="3" column="0" colspan="8">
+ <item>
<widget class="Line" name="line_2">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Minimum" vsizetype="Expanding">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
- <item row="4" column="0">
- <widget class="QLabel" name="_topLabelLabel">
- <property name="text">
- <string>&Top label:</string>
- </property>
- <property name="alignment">
- <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
- </property>
- <property name="buddy">
- <cstring>_topLabelText</cstring>
- </property>
- </widget>
- </item>
- <item row="4" column="7">
- <widget class="QCheckBox" name="_topLabelAuto">
- <property name="text">
- <string>Auto</string>
- </property>
- <property name="checked">
- <bool>true</bool>
- </property>
- </widget>
- </item>
- <item row="5" column="0">
- <widget class="QLabel" name="_bottomLabelLabel">
- <property name="text">
- <string>Botto&m label:</string>
- </property>
- <property name="alignment">
- <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
- </property>
- <property name="buddy">
- <cstring>_bottomLabelText</cstring>
- </property>
- </widget>
- </item>
- <item row="5" column="7">
- <widget class="QCheckBox" name="_bottomLabelAuto">
- <property name="text">
- <string>Auto</string>
- </property>
- <property name="checked">
- <bool>true</bool>
- </property>
- </widget>
- </item>
- <item row="6" column="0">
- <widget class="QLabel" name="_leftLabelLabel">
- <property name="text">
- <string>&Left label:</string>
- </property>
- <property name="alignment">
- <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
- </property>
- <property name="buddy">
- <cstring>_leftLabelText</cstring>
- </property>
- </widget>
- </item>
- <item row="6" column="7">
- <widget class="QCheckBox" name="_leftLabelAuto">
- <property name="text">
- <string>Auto</string>
- </property>
- <property name="checked">
- <bool>true</bool>
- </property>
- </widget>
- </item>
- <item row="7" column="0">
- <widget class="QLabel" name="_rightLabelLabel">
- <property name="text">
- <string>&Right label:</string>
- </property>
- <property name="alignment">
- <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
- </property>
- <property name="buddy">
- <cstring>_rightLabelText</cstring>
- </property>
- </widget>
- </item>
- <item row="7" column="7">
- <widget class="QCheckBox" name="_rightLabelAuto">
- <property name="text">
- <string>Auto</string>
- </property>
- <property name="checked">
- <bool>true</bool>
- </property>
- </widget>
+ <item>
+ <layout class="QGridLayout" name="gridLayout_2">
+ <item row="1" column="0">
+ <widget class="QLabel" name="_bottomLabelLabel">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Botto&m label:</string>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+ </property>
+ <property name="buddy">
+ <cstring>_bottomLabelText</cstring>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="2">
+ <widget class="QCheckBox" name="_topLabelAuto">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Auto</string>
+ </property>
+ <property name="checked">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="1">
+ <widget class="Kst::SVCCTextEdit" name="_rightLabelText">
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>0</width>
+ <height>19</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>16777215</width>
+ <height>22</height>
+ </size>
+ </property>
+ <property name="verticalScrollBarPolicy">
+ <enum>Qt::ScrollBarAlwaysOff</enum>
+ </property>
+ <property name="horizontalScrollBarPolicy">
+ <enum>Qt::ScrollBarAlwaysOff</enum>
+ </property>
+ <property name="lineWrapMode">
+ <enum>QTextEdit::NoWrap</enum>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="0">
+ <widget class="QLabel" name="_rightLabelLabel">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>&Right label:</string>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+ </property>
+ <property name="buddy">
+ <cstring>_rightLabelText</cstring>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="1">
+ <widget class="Kst::SVCCTextEdit" name="_leftLabelText">
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>0</width>
+ <height>19</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>16777215</width>
+ <height>22</height>
+ </size>
+ </property>
+ <property name="verticalScrollBarPolicy">
+ <enum>Qt::ScrollBarAlwaysOff</enum>
+ </property>
+ <property name="horizontalScrollBarPolicy">
+ <enum>Qt::ScrollBarAlwaysOff</enum>
+ </property>
+ <property name="lineWrapMode">
+ <enum>QTextEdit::NoWrap</enum>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="2">
+ <widget class="QCheckBox" name="_rightLabelAuto">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Auto</string>
+ </property>
+ <property name="checked">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="1">
+ <widget class="Kst::SVCCTextEdit" name="_bottomLabelText">
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>0</width>
+ <height>19</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>16777215</width>
+ <height>22</height>
+ </size>
+ </property>
+ <property name="verticalScrollBarPolicy">
+ <enum>Qt::ScrollBarAlwaysOff</enum>
+ </property>
+ <property name="horizontalScrollBarPolicy">
+ <enum>Qt::ScrollBarAlwaysOff</enum>
+ </property>
+ <property name="lineWrapMode">
+ <enum>QTextEdit::NoWrap</enum>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="0">
+ <widget class="QLabel" name="_leftLabelLabel">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>&Left label:</string>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+ </property>
+ <property name="buddy">
+ <cstring>_leftLabelText</cstring>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="1">
+ <widget class="Kst::SVCCTextEdit" name="_topLabelText">
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>0</width>
+ <height>19</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>16777215</width>
+ <height>22</height>
+ </size>
+ </property>
+ <property name="verticalScrollBarPolicy">
+ <enum>Qt::ScrollBarAlwaysOff</enum>
+ </property>
+ <property name="horizontalScrollBarPolicy">
+ <enum>Qt::ScrollBarAlwaysOff</enum>
+ </property>
+ <property name="lineWrapMode">
+ <enum>QTextEdit::NoWrap</enum>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="0">
+ <widget class="QLabel" name="_topLabelLabel">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Top &label:</string>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+ </property>
+ <property name="buddy">
+ <cstring>_topLabelText</cstring>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="2">
+ <widget class="QCheckBox" name="_leftLabelAuto">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Auto</string>
+ </property>
+ <property name="checked">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="2">
+ <widget class="QCheckBox" name="_bottomLabelAuto">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Auto</string>
+ </property>
+ <property name="checked">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item row="4" column="1">
+ <widget class="QLabel" name="label_2">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="font">
+ <font>
+ <italic>true</italic>
+ </font>
+ </property>
+ <property name="text">
+ <string>Supports scalars & strings (name in square brackets) - eg, \
[INDEX:Max (X2)], +embedded equations - eg, [=[INDEX:Max] / 2]
+and LaTeX symbols - eg, \theta. Names and symbols are autocompleted.</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
</item>
- <item row="9" column="0" colspan="8">
+ <item>
<widget class="Line" name="line">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Minimum" vsizetype="Expanding">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
- <item row="10" column="0" colspan="3">
+ <item>
<layout class="QHBoxLayout" name="horizontalLayout_3">
<property name="spacing">
<number>0</number>
@@ -251,22 +477,22 @@
</property>
</widget>
</item>
+ <item>
+ <spacer name="horizontalSpacer">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
</layout>
</item>
- <item row="10" column="4" colspan="4">
- <spacer>
- <property name="orientation">
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>376</width>
- <height>0</height>
- </size>
- </property>
- </spacer>
- </item>
- <item row="11" column="3">
+ <item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
@@ -279,132 +505,6 @@
</property>
</spacer>
</item>
- <item row="4" column="2" colspan="5">
- <widget class="Kst::SVCCTextEdit" name="_topLabelText">
- <property name="enabled">
- <bool>false</bool>
- </property>
- <property name="minimumSize">
- <size>
- <width>0</width>
- <height>19</height>
- </size>
- </property>
- <property name="maximumSize">
- <size>
- <width>16777215</width>
- <height>22</height>
- </size>
- </property>
- <property name="verticalScrollBarPolicy">
- <enum>Qt::ScrollBarAlwaysOff</enum>
- </property>
- <property name="horizontalScrollBarPolicy">
- <enum>Qt::ScrollBarAlwaysOff</enum>
- </property>
- <property name="lineWrapMode">
- <enum>QTextEdit::NoWrap</enum>
- </property>
- </widget>
- </item>
- <item row="5" column="2" colspan="5">
- <widget class="Kst::SVCCTextEdit" name="_bottomLabelText">
- <property name="enabled">
- <bool>false</bool>
- </property>
- <property name="minimumSize">
- <size>
- <width>0</width>
- <height>19</height>
- </size>
- </property>
- <property name="maximumSize">
- <size>
- <width>16777215</width>
- <height>22</height>
- </size>
- </property>
- <property name="verticalScrollBarPolicy">
- <enum>Qt::ScrollBarAlwaysOff</enum>
- </property>
- <property name="horizontalScrollBarPolicy">
- <enum>Qt::ScrollBarAlwaysOff</enum>
- </property>
- <property name="lineWrapMode">
- <enum>QTextEdit::NoWrap</enum>
- </property>
- </widget>
- </item>
- <item row="6" column="2" colspan="5">
- <widget class="Kst::SVCCTextEdit" name="_leftLabelText">
- <property name="enabled">
- <bool>false</bool>
- </property>
- <property name="minimumSize">
- <size>
- <width>0</width>
- <height>19</height>
- </size>
- </property>
- <property name="maximumSize">
- <size>
- <width>16777215</width>
- <height>22</height>
- </size>
- </property>
- <property name="verticalScrollBarPolicy">
- <enum>Qt::ScrollBarAlwaysOff</enum>
- </property>
- <property name="horizontalScrollBarPolicy">
- <enum>Qt::ScrollBarAlwaysOff</enum>
- </property>
- <property name="lineWrapMode">
- <enum>QTextEdit::NoWrap</enum>
- </property>
- </widget>
- </item>
- <item row="7" column="2" colspan="5">
- <widget class="Kst::SVCCTextEdit" name="_rightLabelText">
- <property name="enabled">
- <bool>false</bool>
- </property>
- <property name="minimumSize">
- <size>
- <width>0</width>
- <height>19</height>
- </size>
- </property>
- <property name="maximumSize">
- <size>
- <width>16777215</width>
- <height>22</height>
- </size>
- </property>
- <property name="verticalScrollBarPolicy">
- <enum>Qt::ScrollBarAlwaysOff</enum>
- </property>
- <property name="horizontalScrollBarPolicy">
- <enum>Qt::ScrollBarAlwaysOff</enum>
- </property>
- <property name="lineWrapMode">
- <enum>QTextEdit::NoWrap</enum>
- </property>
- </widget>
- </item>
- <item row="8" column="2" colspan="6">
- <widget class="QLabel" name="label_2">
- <property name="font">
- <font>
- <italic>true</italic>
- </font>
- </property>
- <property name="text">
- <string>Supports scalars & strings (name in square brackets) - eg, \
[INDEX:Max (X2)],
-embedded equations - eg, [=[INDEX:Max] / 2]
-and LaTeX symbols - eg, \theta. Names and symbols are autocompleted.</string>
- </property>
- </widget>
- </item>
</layout>
</widget>
<customwidgets>
@@ -425,7 +525,6 @@ and LaTeX symbols - eg, \theta. Names and symbols are \
autocompleted.</string> <tabstop>_globalLabelItalic</tabstop>
<tabstop>_globalLabelColor</tabstop>
<tabstop>_globalLabelFontFamily</tabstop>
- <tabstop>_autoScaleNumberAxis</tabstop>
<tabstop>_topLabelAuto</tabstop>
<tabstop>_topLabelText</tabstop>
<tabstop>_bottomLabelAuto</tabstop>
@@ -434,7 +533,6 @@ and LaTeX symbols - eg, \theta. Names and symbols are \
autocompleted.</string> <tabstop>_leftLabelText</tabstop>
<tabstop>_rightLabelAuto</tabstop>
<tabstop>_rightLabelText</tabstop>
- <tabstop>_showLegend</tabstop>
<tabstop>_editLegendContents</tabstop>
</tabstops>
<resources/>
diff --git a/src/libkstapp/legendtab.cpp b/src/libkstapp/legendtab.cpp
index 8ec6d76..3bd4eff 100644
--- a/src/libkstapp/legendtab.cpp
+++ b/src/libkstapp/legendtab.cpp
@@ -34,14 +34,15 @@ LegendTab::LegendTab(QWidget *parent)
_add->setToolTip(tr("Select: Alt+s"));
_remove->setToolTip(tr("Remove: Alt+r"));
- _bold->setFixedWidth(32);
- _bold->setFixedHeight(32);
+ int h = fontMetrics().lineSpacing();
+ _bold->setFixedWidth(h);
+ _bold->setFixedHeight(h);
_bold->setIcon(KstGetIcon("kst_bold"));
- _italic->setFixedWidth(32);
- _italic->setFixedHeight(32);
+ _italic->setFixedWidth(h);
+ _italic->setFixedHeight(h);
_italic->setIcon(KstGetIcon("kst_italic"));
- _labelColor->setFixedWidth(32);
- _labelColor->setFixedHeight(32);
+ _labelColor->setFixedWidth(h);
+ _labelColor->setFixedHeight(h);
connect(_add, SIGNAL(clicked()), this, SLOT(addButtonClicked()));
diff --git a/src/libkstapp/overridelabeltab.cpp b/src/libkstapp/overridelabeltab.cpp
index 3866e60..0d92edc 100644
--- a/src/libkstapp/overridelabeltab.cpp
+++ b/src/libkstapp/overridelabeltab.cpp
@@ -24,12 +24,15 @@ OverrideLabelTab::OverrideLabelTab(QString title, QWidget \
*parent) : DialogTab(parent), _fontDirty(false) {
setupUi(this);
+ int h = fontMetrics().lineSpacing();
_bold->setIcon(KstGetIcon("kst_bold"));
- _bold->setFixedWidth(32);
+ _bold->setFixedWidth(h);
+ _bold->setFixedHeight(h);
_italic->setIcon(KstGetIcon("kst_italic"));
- _italic->setFixedWidth(32);
- _labelColor->setFixedWidth(32);
- _labelColor->setFixedHeight(32);
+ _italic->setFixedWidth(h);
+ _italic->setFixedHeight(h);
+ _labelColor->setFixedWidth(h);
+ _labelColor->setFixedHeight(h);
setTabTitle(title);
diff --git a/src/libkstapp/overridelabeltab.ui b/src/libkstapp/overridelabeltab.ui
index 8984926..2e71c04 100644
--- a/src/libkstapp/overridelabeltab.ui
+++ b/src/libkstapp/overridelabeltab.ui
@@ -6,24 +6,28 @@
<rect>
<x>0</x>
<y>0</y>
- <width>451</width>
- <height>271</height>
+ <width>1425</width>
+ <height>858</height>
</rect>
</property>
- <property name="minimumSize">
- <size>
- <width>400</width>
- <height>0</height>
- </size>
- </property>
- <layout class="QGridLayout" name="gridLayout_2">
- <item row="0" column="0">
+ <layout class="QVBoxLayout" name="verticalLayout">
+ <item>
<layout class="QGridLayout" name="gridLayout">
- <property name="horizontalSpacing">
- <number>0</number>
- </property>
- <item row="1" column="0">
- <widget class="QLabel" name="_Label_11">
+ <item row="1" column="2">
+ <widget class="QLabel" name="label">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Fixed" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string> points</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="4">
+ <widget class="QPushButton" name="_italic">
<property name="enabled">
<bool>false</bool>
</property>
@@ -33,55 +37,43 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="text">
- <string>Font &size:</string>
- </property>
- <property name="alignment">
- <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+ <property name="checkable">
+ <bool>true</bool>
</property>
- <property name="buddy">
- <cstring>_fontSize</cstring>
+ <property name="si" stdset="0">
+ <string/>
</property>
</widget>
</item>
- <item row="1" column="1" colspan="2">
- <widget class="QDoubleSpinBox" name="_fontSize">
+ <item row="1" column="5">
+ <widget class="Kst::ColorButton" name="_labelColor">
<property name="enabled">
<bool>false</bool>
</property>
- <property name="decimals">
- <number>1</number>
- </property>
- <property name="minimum">
- <double>-25.000000000000000</double>
- </property>
- <property name="singleStep">
- <double>1.000000000000000</double>
+ <property name="si" stdset="0">
+ <string/>
</property>
</widget>
</item>
- <item row="1" column="5">
- <widget class="QPushButton" name="_italic">
+ <item row="1" column="0">
+ <widget class="QLabel" name="_Label_11">
<property name="enabled">
<bool>false</bool>
</property>
<property name="sizePolicy">
- <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+ <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="iconSize">
- <size>
- <width>22</width>
- <height>22</height>
- </size>
+ <property name="text">
+ <string>Font si&ze:</string>
</property>
- <property name="checkable">
- <bool>true</bool>
+ <property name="alignment">
+ <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
- <property name="si" stdset="0">
- <string notr="true">override label italic</string>
+ <property name="buddy">
+ <cstring>_fontSize</cstring>
</property>
</widget>
</item>
@@ -91,13 +83,13 @@
<bool>false</bool>
</property>
<property name="sizePolicy">
- <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+ <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
- <string>Font famil&y:</string>
+ <string>Font fa&mily:</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
@@ -107,14 +99,23 @@
</property>
</widget>
</item>
- <item row="2" column="1" colspan="6">
- <widget class="QFontComboBox" name="_family">
+ <item row="1" column="1">
+ <widget class="QDoubleSpinBox" name="_fontSize">
<property name="enabled">
<bool>false</bool>
</property>
+ <property name="decimals">
+ <number>1</number>
+ </property>
+ <property name="minimum">
+ <double>-25.000000000000000</double>
+ </property>
+ <property name="singleStep">
+ <double>1.000000000000000</double>
+ </property>
</widget>
</item>
- <item row="1" column="4">
+ <item row="1" column="3">
<widget class="QPushButton" name="_bold">
<property name="enabled">
<bool>false</bool>
@@ -125,50 +126,47 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="iconSize">
- <size>
- <width>22</width>
- <height>22</height>
- </size>
- </property>
<property name="checkable">
<bool>true</bool>
</property>
<property name="si" stdset="0">
- <string notr="true">override label bold</string>
+ <string/>
</property>
</widget>
</item>
- <item row="0" column="0" colspan="3">
- <widget class="QCheckBox" name="_useDefault">
- <property name="text">
- <string>&Use plot default font</string>
+ <item row="1" column="6">
+ <spacer name="horizontalSpacer">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
</property>
- <property name="checked">
- <bool>true</bool>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
</property>
- </widget>
+ </spacer>
</item>
- <item row="1" column="6">
- <widget class="Kst::ColorButton" name="_labelColor">
+ <item row="2" column="1" colspan="6">
+ <widget class="QFontComboBox" name="_family">
<property name="enabled">
<bool>false</bool>
</property>
- <property name="si" stdset="0">
- <string notr="true">override label color</string>
- </property>
</widget>
</item>
- <item row="1" column="3">
- <widget class="QLabel" name="label">
+ <item row="0" column="0" colspan="7">
+ <widget class="QCheckBox" name="_useDefault">
<property name="text">
- <string> points</string>
+ <string>&Use plot default font</string>
+ </property>
+ <property name="checked">
+ <bool>true</bool>
</property>
</widget>
</item>
</layout>
</item>
- <item row="1" column="0">
+ <item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
@@ -176,7 +174,7 @@
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
- <height>129</height>
+ <height>659</height>
</size>
</property>
</spacer>
diff --git a/src/libkstapp/themedialog.cpp b/src/libkstapp/themedialog.cpp
index 1545a75..1fe242d 100644
--- a/src/libkstapp/themedialog.cpp
+++ b/src/libkstapp/themedialog.cpp
@@ -53,14 +53,16 @@ ThemeDialog::ThemeDialog(QWidget *parent) : QDialog(parent) {
connect(_buttonBox, SIGNAL(clicked(QAbstractButton*)),
this, SLOT(buttonClicked(QAbstractButton*)));
- _bold->setFixedWidth(32);
- _bold->setFixedHeight(32);
+ int h = fontMetrics().lineSpacing();
+
+ _bold->setFixedWidth(h);
+ _bold->setFixedHeight(h);
_bold->setIcon(KstGetIcon("kst_bold"));
- _italic->setFixedWidth(32);
- _italic->setFixedHeight(32);
+ _italic->setFixedWidth(h);
+ _italic->setFixedHeight(h);
_italic->setIcon(KstGetIcon("kst_italic"));
- _labelColor->setFixedWidth(32);
- _labelColor->setFixedHeight(32);
+ _labelColor->setFixedWidth(h);
+ _labelColor->setFixedHeight(h);
_applyToExisting->setChecked(true);
_saveAsDefault->setChecked(true);
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic