Toolbar and tool buttons style. (#2357)

* Toolbar and tool buttons style.

- Add ability to change toolbar state and tool buttons style via
application settings widget.
- Save/restore toolbar state on app start/finish.
- Resolves #2343.

* Implicitly convert enum to QVariant
This commit is contained in:
boppybibbles
2019-01-16 18:04:32 +02:00
committed by Jonathan White
parent f8c6c9f72c
commit d09ca076dc
5 changed files with 134 additions and 1 deletions

View File

@@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>684</width>
<height>842</height>
<height>881</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_3">
@@ -186,6 +186,100 @@
</property>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="toolbarMovableLayout">
<property name="spacing">
<number>0</number>
</property>
<property name="sizeConstraint">
<enum>QLayout::SetMaximumSize</enum>
</property>
<item>
<spacer name="toolbarMovableSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QCheckBox" name="toolbarMovableCheckBox">
<property name="enabled">
<bool>true</bool>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Movable toolbar</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="toolButtonStyleLayout">
<property name="spacing">
<number>15</number>
</property>
<item>
<spacer name="toolButtonStyleSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item alignment="Qt::AlignRight">
<widget class="QLabel" name="toolButtonStyleLabel">
<property name="enabled">
<bool>true</bool>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Button style</string>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="toolButtonStyleComboBox">
<property name="enabled">
<bool>true</bool>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
</item>
</layout>
</item>
<item>
<widget class="QCheckBox" name="minimizeOnCloseCheckBox">
<property name="text">