Commit 39c64717 authored by Marco Martin's avatar Marco Martin
Browse files

Revert "Bigger button on tablet mode configurable"

This reverts commit 28903091.
parent 28903091
Pipeline #168639 passed with stage
in 1 minute and 40 seconds
......@@ -8,11 +8,6 @@
<!-- common options -->
<group name="Common">
<!-- tablet mode -->
<entry name="BigControlsOnTablet" type = "Bool">
<default>false</default>
</entry>
<!-- shadow -->
<entry name="ShadowStrength" type = "Int">
<default>255</default>
......
......@@ -267,7 +267,6 @@ namespace Breeze
QEvent e(QEvent::StyleChange);
QCoreApplication::sendEvent(w, &e);
w->update();
w->updateGeometry();
}
}
});
......@@ -586,61 +585,61 @@ namespace Breeze
return Metrics::MenuItem_MarginHeight;
}
case LineEdit_FrameWidth:
if( isTabletMode() && StyleConfigData::bigControlsOnTablet() ) {
if( isTabletMode() ) {
return Metrics::LineEdit_FrameWidth_Tablet;
} else {
return Metrics::LineEdit_FrameWidth;
}
case ComboBox_FrameWidth:
if( isTabletMode() && StyleConfigData::bigControlsOnTablet() ) {
if( isTabletMode() ) {
return Metrics::ComboBox_FrameWidth_Tablet;
} else {
return Metrics::ComboBox_FrameWidth;
}
case SpinBox_FrameWidth:
if( isTabletMode() && StyleConfigData::bigControlsOnTablet() ) {
if( isTabletMode() ) {
return Metrics::SpinBox_FrameWidth_Tablet;
} else {
return Metrics::SpinBox_FrameWidth;
}
case CheckBox_Size:
if( isTabletMode() && StyleConfigData::bigControlsOnTablet() ) {
if( isTabletMode() ) {
return Metrics::CheckBox_Size_Tablet;
} else {
return Metrics::CheckBox_Size;
}
case Button_MarginWidth:
if( isTabletMode() && StyleConfigData::bigControlsOnTablet() ) {
if( isTabletMode() ) {
return Metrics::Button_MarginWidth_Tablet;
} else {
return Metrics::Button_MarginWidth;
}
case ToolButton_MarginWidth:
if( isTabletMode() && StyleConfigData::bigControlsOnTablet() ) {
if( isTabletMode() ) {
return Metrics::ToolButton_MarginWidth_Tablet;
} else {
return Metrics::ToolButton_MarginWidth;
}
case Slider_GrooveThickness:
if( isTabletMode() && StyleConfigData::bigControlsOnTablet() ) {
if( isTabletMode() ) {
return Metrics::Slider_GrooveThickness_Tablet;
} else {
return Metrics::Slider_GrooveThickness;
}
case Slider_ControlThickness:
if( isTabletMode() && StyleConfigData::bigControlsOnTablet() ) {
if( isTabletMode() ) {
return Metrics::Slider_ControlThickness_Tablet;
} else {
return Metrics::Slider_ControlThickness;
}
case TabBar_TabMarginHeight:
if( isTabletMode() && StyleConfigData::bigControlsOnTablet() ) {
if( isTabletMode() ) {
return Metrics::TabBar_TabMarginHeight_Tablet;
} else {
return Metrics::TabBar_TabMarginHeight;
}
case TabBar_TabMarginWidth:
if( isTabletMode() && StyleConfigData::bigControlsOnTablet() ) {
if( isTabletMode() ) {
return Metrics::TabBar_TabMarginWidth_Tablet;
} else {
return Metrics::TabBar_TabMarginWidth;
......@@ -1779,20 +1778,6 @@ namespace Breeze
// widget explorer
_widgetExplorer->setEnabled( StyleConfigData::widgetExplorerEnabled() );
_widgetExplorer->setDrawWidgetRects( StyleConfigData::drawWidgetRects() );
// Refresh the tablet mode layout changes
#if BREEZE_HAVE_QTQUICK
const QWidgetList all = qApp->allWidgets();
for (QWidgetList::ConstIterator it = all.constBegin(), cend = all.constEnd(); it != cend; ++it) {
QWidget *w = *it;
if (w->windowType() != Qt::Desktop && !w->testAttribute(Qt::WA_SetStyle)) {
QEvent e(QEvent::StyleChange);
QCoreApplication::sendEvent(w, &e);
w->update();
w->updateGeometry();
}
}
#endif
}
//___________________________________________________________________________________________________________________
......
......@@ -31,7 +31,6 @@ namespace Breeze
// load setup from configData
load();
connect( _bigControlsOnTablet, &QAbstractButton::toggled, this, &StyleConfig::updateChanged );
connect( _tabBarDrawCenteredTabs, &QAbstractButton::toggled, this, &StyleConfig::updateChanged );
connect( _toolBarDrawItemSeparator, &QAbstractButton::toggled, this, &StyleConfig::updateChanged );
connect( _viewDrawFocusIndicator, &QAbstractButton::toggled, this, &StyleConfig::updateChanged );
......@@ -51,7 +50,6 @@ namespace Breeze
//__________________________________________________________________
void StyleConfig::save()
{
StyleConfigData::setBigControlsOnTablet( _bigControlsOnTablet->isChecked() );
StyleConfigData::setTabBarDrawCenteredTabs( _tabBarDrawCenteredTabs->isChecked() );
StyleConfigData::setToolBarDrawItemSeparator( _toolBarDrawItemSeparator->isChecked() );
StyleConfigData::setViewDrawFocusIndicator( _viewDrawFocusIndicator->isChecked() );
......@@ -98,7 +96,6 @@ namespace Breeze
// check if any value was modified
if( _tabBarDrawCenteredTabs->isChecked() != StyleConfigData::tabBarDrawCenteredTabs() ) modified = true;
else if( _bigControlsOnTablet->isChecked() != StyleConfigData::bigControlsOnTablet() ) modified = true;
else if( _toolBarDrawItemSeparator->isChecked() != StyleConfigData::toolBarDrawItemSeparator() ) modified = true;
else if( _viewDrawFocusIndicator->isChecked() != StyleConfigData::viewDrawFocusIndicator() ) modified = true;
else if( _dockWidgetDrawFrame->isChecked() != StyleConfigData::dockWidgetDrawFrame() ) modified = true;
......@@ -120,7 +117,6 @@ namespace Breeze
void StyleConfig::load()
{
_bigControlsOnTablet->setChecked( StyleConfigData::bigControlsOnTablet() );
_tabBarDrawCenteredTabs->setChecked( StyleConfigData::tabBarDrawCenteredTabs() );
_toolBarDrawItemSeparator->setChecked( StyleConfigData::toolBarDrawItemSeparator() );
_viewDrawFocusIndicator->setChecked( StyleConfigData::viewDrawFocusIndicator() );
......
......@@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>562</width>
<height>428</height>
<height>264</height>
</rect>
</property>
<property name="sizePolicy">
......@@ -39,80 +39,7 @@
<string>General</string>
</attribute>
<layout class="QGridLayout" name="gridLayout">
<item row="8" column="1" colspan="3">
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>49</height>
</size>
</property>
</spacer>
</item>
<item row="5" column="1" colspan="4">
<widget class="QCheckBox" name="_splitterProxyEnabled">
<property name="text">
<string>Enable extended resize handles</string>
</property>
</widget>
</item>
<item row="7" column="2" colspan="2">
<widget class="QComboBox" name="_windowDragMode">
<item>
<property name="text">
<string>Drag windows from titlebar only</string>
</property>
</item>
<item>
<property name="text">
<string>Drag windows from titlebar, menubar and toolbars</string>
</property>
</item>
<item>
<property name="text">
<string>Drag windows from all empty areas</string>
</property>
</item>
</widget>
</item>
<item row="4" column="1" colspan="4">
<widget class="QCheckBox" name="_sliderDrawTickMarks">
<property name="text">
<string>Draw slider tick marks</string>
</property>
</widget>
</item>
<item row="6" column="4">
<spacer name="horizontalSpacer_3">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>65</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="0" column="1" colspan="4">
<widget class="QCheckBox" name="_tabBarDrawCenteredTabs">
<property name="text">
<string>Center tabbar tabs</string>
</property>
</widget>
</item>
<item row="3" column="1" colspan="4">
<widget class="QCheckBox" name="_viewDrawFocusIndicator">
<property name="text">
<string>Draw focus indicator in lists</string>
</property>
</widget>
</item>
<item row="7" column="1">
<item row="6" column="1">
<widget class="QLabel" name="_windowDragLabel">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
......@@ -132,13 +59,13 @@
</widget>
</item>
<item row="2" column="1" colspan="4">
<widget class="QCheckBox" name="_toolBarDrawItemSeparator">
<widget class="QCheckBox" name="_viewDrawFocusIndicator">
<property name="text">
<string>Draw toolbar item separators</string>
<string>Draw focus indicator in lists</string>
</property>
</widget>
</item>
<item row="6" column="1">
<item row="5" column="1">
<widget class="QLabel" name="_mnemonicsLabel">
<property name="text">
<string>&amp;Keyboard accelerators visibility:</string>
......@@ -151,7 +78,7 @@
</property>
</widget>
</item>
<item row="6" column="2" colspan="2">
<item row="5" column="2" colspan="2">
<widget class="QComboBox" name="_mnemonicsMode">
<item>
<property name="text">
......@@ -170,10 +97,76 @@
</item>
</widget>
</item>
<item row="1" column="1">
<widget class="QCheckBox" name="_bigControlsOnTablet">
<item row="5" column="4">
<spacer name="horizontalSpacer_3">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>65</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="6" column="2" colspan="2">
<widget class="QComboBox" name="_windowDragMode">
<item>
<property name="text">
<string>Drag windows from titlebar only</string>
</property>
</item>
<item>
<property name="text">
<string>Drag windows from titlebar, menubar and toolbars</string>
</property>
</item>
<item>
<property name="text">
<string>Drag windows from all empty areas</string>
</property>
</item>
</widget>
</item>
<item row="7" column="1" colspan="3">
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>49</height>
</size>
</property>
</spacer>
</item>
<item row="0" column="1" colspan="4">
<widget class="QCheckBox" name="_tabBarDrawCenteredTabs">
<property name="text">
<string>Bigger buttons in tablet mode</string>
<string>Center tabbar tabs</string>
</property>
</widget>
</item>
<item row="1" column="1" colspan="4">
<widget class="QCheckBox" name="_toolBarDrawItemSeparator">
<property name="text">
<string>Draw toolbar item separators</string>
</property>
</widget>
</item>
<item row="3" column="1" colspan="4">
<widget class="QCheckBox" name="_sliderDrawTickMarks">
<property name="text">
<string>Draw slider tick marks</string>
</property>
</widget>
</item>
<item row="4" column="1" colspan="4">
<widget class="QCheckBox" name="_splitterProxyEnabled">
<property name="text">
<string>Enable extended resize handles</string>
</property>
</widget>
</item>
......@@ -471,5 +464,6 @@
<tabstop>_scrollBarAddLineButtons</tabstop>
</tabstops>
<resources/>
<connections/>
<connections>
</connections>
</ui>
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment