From 3f89ed093ffac4c67827d8838a3e069c66022c04 Mon Sep 17 00:00:00 2001 From: konero Date: Sat, 22 Oct 2016 17:42:27 +0100 Subject: [PATCH] Tidy QGroupBox Style Fix alignment, fix indicator style, add padding. --- stuff/config/qss/gray_048/gray_048.less | 13 +++++++---- stuff/config/qss/gray_048/gray_048.qss | 27 +++++++++++----------- stuff/config/qss/gray_048/gray_048_mac.qss | 27 +++++++++++----------- stuff/config/qss/gray_072/gray_072.less | 13 +++++++---- stuff/config/qss/gray_072/gray_072.qss | 27 +++++++++++----------- stuff/config/qss/gray_072/gray_072_mac.qss | 27 +++++++++++----------- stuff/config/qss/gray_128/gray_128.less | 10 ++++---- stuff/config/qss/gray_128/gray_128.qss | 15 +++++------- stuff/config/qss/gray_128/gray_128_mac.qss | 15 +++++------- 9 files changed, 89 insertions(+), 85 deletions(-) diff --git a/stuff/config/qss/gray_048/gray_048.less b/stuff/config/qss/gray_048/gray_048.less index f2fcddb9..76059fe6 100644 --- a/stuff/config/qss/gray_048/gray_048.less +++ b/stuff/config/qss/gray_048/gray_048.less @@ -347,14 +347,17 @@ QSlider { QGroupBox { border: 1px solid @m_baseTxtColor; - .set_margin( 5px, 5px ); - .set_padding( 3px, 5px ); + margin: 6px 0 0 0; + .set_padding(3px, 5px); + &::title { subcontrol-origin: margin; - padding: 0px; - margin-top: -4px; - /*bottom: 3px;*/ left: 15px; + margin-top: -2px; + .set_padding(5px, 0px); + } + &::indicator { + &:extend(QCheckBox::indicator all); } } diff --git a/stuff/config/qss/gray_048/gray_048.qss b/stuff/config/qss/gray_048/gray_048.qss index 0ae606d2..07bd76c3 100644 --- a/stuff/config/qss/gray_048/gray_048.qss +++ b/stuff/config/qss/gray_048/gray_048.qss @@ -302,7 +302,8 @@ QCheckBox:hover { QCheckBox:disabled { color: #808080; } -QCheckBox::indicator { +QCheckBox::indicator, +QGroupBox::indicator { background-color: #161616; border-style: inset; border-left-color: #000000; @@ -311,7 +312,8 @@ QCheckBox::indicator { border-bottom-color: #525252; border-width: 2px; } -QCheckBox::indicator:disabled { +QCheckBox::indicator:disabled, +QGroupBox::indicator:disabled { background-color: #3d3d3d; border-style: inset; border-left-color: #191919; @@ -319,10 +321,12 @@ QCheckBox::indicator:disabled { border-right-color: #656565; border-bottom-color: #797979; } -QCheckBox::indicator:checked { +QCheckBox::indicator:checked, +QGroupBox::indicator:checked { image: url("../gray_072/imgs/check_indicator.png"); } -QCheckBox::indicator:checked:disabled { +QCheckBox::indicator:checked:disabled, +QGroupBox::indicator:checked:disabled { image: url("../gray_072/imgs/check_indicator_disabled.png"); } QSlider::groove:horizontal { @@ -350,10 +354,7 @@ QSlider::handle:horizontal { } QGroupBox { border: 1px solid #e6e6e6; - margin-left: 5px; - margin-right: 5px; - margin-top: 5px; - margin-bottom: 5px; + margin: 6px 0 0 0; padding-left: 3px; padding-right: 3px; padding-top: 5px; @@ -361,10 +362,12 @@ QGroupBox { } QGroupBox::title { subcontrol-origin: margin; - padding: 0px; - margin-top: -4px; - /*bottom: 3px;*/ left: 15px; + margin-top: -2px; + padding-left: 5px; + padding-right: 5px; + padding-top: 0px; + padding-bottom: 0px; } QSplitter::handle { background-color: #707070; @@ -1415,5 +1418,3 @@ QDialog #dialogButtonFrame { border-right-color: white; border-bottom-color: white; } - -//# sourceMappingURL=gray_048.qss.map \ No newline at end of file diff --git a/stuff/config/qss/gray_048/gray_048_mac.qss b/stuff/config/qss/gray_048/gray_048_mac.qss index bd59c11a..07bd76c3 100644 --- a/stuff/config/qss/gray_048/gray_048_mac.qss +++ b/stuff/config/qss/gray_048/gray_048_mac.qss @@ -302,7 +302,8 @@ QCheckBox:hover { QCheckBox:disabled { color: #808080; } -QCheckBox::indicator { +QCheckBox::indicator, +QGroupBox::indicator { background-color: #161616; border-style: inset; border-left-color: #000000; @@ -311,7 +312,8 @@ QCheckBox::indicator { border-bottom-color: #525252; border-width: 2px; } -QCheckBox::indicator:disabled { +QCheckBox::indicator:disabled, +QGroupBox::indicator:disabled { background-color: #3d3d3d; border-style: inset; border-left-color: #191919; @@ -319,10 +321,12 @@ QCheckBox::indicator:disabled { border-right-color: #656565; border-bottom-color: #797979; } -QCheckBox::indicator:checked { +QCheckBox::indicator:checked, +QGroupBox::indicator:checked { image: url("../gray_072/imgs/check_indicator.png"); } -QCheckBox::indicator:checked:disabled { +QCheckBox::indicator:checked:disabled, +QGroupBox::indicator:checked:disabled { image: url("../gray_072/imgs/check_indicator_disabled.png"); } QSlider::groove:horizontal { @@ -350,10 +354,7 @@ QSlider::handle:horizontal { } QGroupBox { border: 1px solid #e6e6e6; - margin-left: 5px; - margin-right: 5px; - margin-top: 5px; - margin-bottom: 5px; + margin: 6px 0 0 0; padding-left: 3px; padding-right: 3px; padding-top: 5px; @@ -361,10 +362,12 @@ QGroupBox { } QGroupBox::title { subcontrol-origin: margin; - padding: 0px; - margin-top: -4px; - /*bottom: 3px;*/ left: 15px; + margin-top: -2px; + padding-left: 5px; + padding-right: 5px; + padding-top: 0px; + padding-bottom: 0px; } QSplitter::handle { background-color: #707070; @@ -1415,5 +1418,3 @@ QDialog #dialogButtonFrame { border-right-color: white; border-bottom-color: white; } - -//# sourceMappingURL=gray_048_mac.qss.map \ No newline at end of file diff --git a/stuff/config/qss/gray_072/gray_072.less b/stuff/config/qss/gray_072/gray_072.less index ce5e94b9..96af533a 100644 --- a/stuff/config/qss/gray_072/gray_072.less +++ b/stuff/config/qss/gray_072/gray_072.less @@ -345,14 +345,17 @@ QSlider { QGroupBox { border: 1px solid @m_baseTxtColor; - .set_margin( 5px, 5px ); - .set_padding( 3px, 5px ); + margin: 6px 0 0 0; + .set_padding(3px, 5px); + &::title { subcontrol-origin: margin; - padding: 0px; - margin-top: -4px; - /*bottom: 3px;*/ left: 15px; + margin-top: -2px; + .set_padding(5px, 0px); + } + &::indicator { + &:extend(QCheckBox::indicator all); } } diff --git a/stuff/config/qss/gray_072/gray_072.qss b/stuff/config/qss/gray_072/gray_072.qss index b0acaee3..8b8f8a5a 100644 --- a/stuff/config/qss/gray_072/gray_072.qss +++ b/stuff/config/qss/gray_072/gray_072.qss @@ -302,7 +302,8 @@ QCheckBox:hover { QCheckBox:disabled { color: #505050; } -QCheckBox::indicator { +QCheckBox::indicator, +QGroupBox::indicator { background-color: #2f2f2f; border-style: inset; border-left-color: #060606; @@ -311,7 +312,8 @@ QCheckBox::indicator { border-bottom-color: #676767; border-width: 2px; } -QCheckBox::indicator:disabled { +QCheckBox::indicator:disabled, +QGroupBox::indicator:disabled { background-color: #555555; border-style: inset; border-left-color: #2d2d2d; @@ -319,10 +321,12 @@ QCheckBox::indicator:disabled { border-right-color: #797979; border-bottom-color: #8d8d8d; } -QCheckBox::indicator:checked { +QCheckBox::indicator:checked, +QGroupBox::indicator:checked { image: url("imgs/check_indicator.png"); } -QCheckBox::indicator:checked:disabled { +QCheckBox::indicator:checked:disabled, +QGroupBox::indicator:checked:disabled { image: url("imgs/check_indicator_disabled.png"); } QSlider::groove:horizontal { @@ -350,10 +354,7 @@ QSlider::handle:horizontal { } QGroupBox { border: 1px solid #e6e6e6; - margin-left: 5px; - margin-right: 5px; - margin-top: 5px; - margin-bottom: 5px; + margin: 6px 0 0 0; padding-left: 3px; padding-right: 3px; padding-top: 5px; @@ -361,10 +362,12 @@ QGroupBox { } QGroupBox::title { subcontrol-origin: margin; - padding: 0px; - margin-top: -4px; - /*bottom: 3px;*/ left: 15px; + margin-top: -2px; + padding-left: 5px; + padding-right: 5px; + padding-top: 0px; + padding-bottom: 0px; } QSplitter::handle { background-color: #888888; @@ -1415,5 +1418,3 @@ QDialog #dialogButtonFrame { border-right-color: white; border-bottom-color: white; } - -//# sourceMappingURL=gray_072.qss.map \ No newline at end of file diff --git a/stuff/config/qss/gray_072/gray_072_mac.qss b/stuff/config/qss/gray_072/gray_072_mac.qss index 770c273f..8b8f8a5a 100644 --- a/stuff/config/qss/gray_072/gray_072_mac.qss +++ b/stuff/config/qss/gray_072/gray_072_mac.qss @@ -302,7 +302,8 @@ QCheckBox:hover { QCheckBox:disabled { color: #505050; } -QCheckBox::indicator { +QCheckBox::indicator, +QGroupBox::indicator { background-color: #2f2f2f; border-style: inset; border-left-color: #060606; @@ -311,7 +312,8 @@ QCheckBox::indicator { border-bottom-color: #676767; border-width: 2px; } -QCheckBox::indicator:disabled { +QCheckBox::indicator:disabled, +QGroupBox::indicator:disabled { background-color: #555555; border-style: inset; border-left-color: #2d2d2d; @@ -319,10 +321,12 @@ QCheckBox::indicator:disabled { border-right-color: #797979; border-bottom-color: #8d8d8d; } -QCheckBox::indicator:checked { +QCheckBox::indicator:checked, +QGroupBox::indicator:checked { image: url("imgs/check_indicator.png"); } -QCheckBox::indicator:checked:disabled { +QCheckBox::indicator:checked:disabled, +QGroupBox::indicator:checked:disabled { image: url("imgs/check_indicator_disabled.png"); } QSlider::groove:horizontal { @@ -350,10 +354,7 @@ QSlider::handle:horizontal { } QGroupBox { border: 1px solid #e6e6e6; - margin-left: 5px; - margin-right: 5px; - margin-top: 5px; - margin-bottom: 5px; + margin: 6px 0 0 0; padding-left: 3px; padding-right: 3px; padding-top: 5px; @@ -361,10 +362,12 @@ QGroupBox { } QGroupBox::title { subcontrol-origin: margin; - padding: 0px; - margin-top: -4px; - /*bottom: 3px;*/ left: 15px; + margin-top: -2px; + padding-left: 5px; + padding-right: 5px; + padding-top: 0px; + padding-bottom: 0px; } QSplitter::handle { background-color: #888888; @@ -1415,5 +1418,3 @@ QDialog #dialogButtonFrame { border-right-color: white; border-bottom-color: white; } - -//# sourceMappingURL=gray_072_mac.qss.map \ No newline at end of file diff --git a/stuff/config/qss/gray_128/gray_128.less b/stuff/config/qss/gray_128/gray_128.less index 9786522d..c557ebd7 100644 --- a/stuff/config/qss/gray_128/gray_128.less +++ b/stuff/config/qss/gray_128/gray_128.less @@ -203,14 +203,14 @@ QCheckBox { QGroupBox { border: 1px solid; - .set_margin( 5px, 5px ); - .set_padding( 3px, 5px ); + margin: 6px 0 0 0; + .set_padding(3px, 5px); + &::title { subcontrol-origin: margin; - padding: 0px; - margin-top: -4px; - /*bottom: 3px;*/ left: 15px; + margin-top: -2px; + .set_padding(5px, 0px); } } diff --git a/stuff/config/qss/gray_128/gray_128.qss b/stuff/config/qss/gray_128/gray_128.qss index 02d10261..926180bd 100644 --- a/stuff/config/qss/gray_128/gray_128.qss +++ b/stuff/config/qss/gray_128/gray_128.qss @@ -125,10 +125,7 @@ QCheckBox:disabled { } QGroupBox { border: 1px solid; - margin-left: 5px; - margin-right: 5px; - margin-top: 5px; - margin-bottom: 5px; + margin: 6px 0 0 0; padding-left: 3px; padding-right: 3px; padding-top: 5px; @@ -136,10 +133,12 @@ QGroupBox { } QGroupBox::title { subcontrol-origin: margin; - padding: 0px; - margin-top: -4px; - /*bottom: 3px;*/ left: 15px; + margin-top: -2px; + padding-left: 5px; + padding-right: 5px; + padding-top: 0px; + padding-bottom: 0px; } /* ------ Toonz Classes Difinitions ------ */ /* ------ TPanel ------ */ @@ -1154,5 +1153,3 @@ QDialog #dialogButtonFrame { border-right-color: white; border-bottom-color: white; } - -//# sourceMappingURL=gray_128.qss.map \ No newline at end of file diff --git a/stuff/config/qss/gray_128/gray_128_mac.qss b/stuff/config/qss/gray_128/gray_128_mac.qss index ef8ac61a..926180bd 100644 --- a/stuff/config/qss/gray_128/gray_128_mac.qss +++ b/stuff/config/qss/gray_128/gray_128_mac.qss @@ -125,10 +125,7 @@ QCheckBox:disabled { } QGroupBox { border: 1px solid; - margin-left: 5px; - margin-right: 5px; - margin-top: 5px; - margin-bottom: 5px; + margin: 6px 0 0 0; padding-left: 3px; padding-right: 3px; padding-top: 5px; @@ -136,10 +133,12 @@ QGroupBox { } QGroupBox::title { subcontrol-origin: margin; - padding: 0px; - margin-top: -4px; - /*bottom: 3px;*/ left: 15px; + margin-top: -2px; + padding-left: 5px; + padding-right: 5px; + padding-top: 0px; + padding-bottom: 0px; } /* ------ Toonz Classes Difinitions ------ */ /* ------ TPanel ------ */ @@ -1154,5 +1153,3 @@ QDialog #dialogButtonFrame { border-right-color: white; border-bottom-color: white; } - -//# sourceMappingURL=gray_128_mac.qss.map \ No newline at end of file