Updates to scrollbar view

main
Alexhuszagh 2016-10-26 15:51:01 -04:00
parent 6b04b6572f
commit 053d3cef07
6 changed files with 122 additions and 110 deletions

View File

@ -53,7 +53,7 @@ def main():
logging.basicConfig(level=logging.DEBUG) logging.basicConfig(level=logging.DEBUG)
# create the application and the main window # create the application and the main window
app = QtWidgets.QApplication(sys.argv) app = QtWidgets.QApplication(sys.argv)
app.setStyle(QtWidgets.QStyleFactory.create("fusion")) #app.setStyle(QtWidgets.QStyleFactory.create("fusion"))
window = QtWidgets.QMainWindow() window = QtWidgets.QMainWindow()
# setup ui # setup ui

View File

@ -219,35 +219,35 @@ QMenuBar::item
QMenuBar::item:selected QMenuBar::item:selected
{ {
background: transparent; background: transparent;
border: 1px solid #76797c; border: 0.1ex solid #76797c;
} }
QMenuBar::item:pressed QMenuBar::item:pressed
{ {
border: 1px solid #76797c; border: 0.1ex solid #76797c;
background-color: #3daee9; background-color: #3daee9;
color: #eff0f1; color: #eff0f1;
margin-bottom:-1px; margin-bottom: -0.1ex;
padding-bottom:1px; padding-bottom: 0.1ex;
} }
QMenu QMenu
{ {
border: 1px solid #76797c; border: 0.1ex solid #76797c;
color: #eff0f1; color: #eff0f1;
margin: 2px; margin: 2px;
} }
QMenu::icon QMenu::icon
{ {
margin: 5px; margin: 0.5ex;
} }
QMenu::item QMenu::item
{ {
padding: 5px 30px 5px 30px; padding: 0.5ex 3ex 0.5ex 3ex;
margin-left: 5px; margin-left: 0.5ex;
border: 1px solid transparent; /* reserve space for selection border */ border: 0.1ex solid transparent; /* reserve space for selection border */
} }
QMenu::item:selected QMenu::item:selected
@ -257,65 +257,61 @@ QMenu::item:selected
QMenu::separator QMenu::separator
{ {
height: 2px; height: 0.2ex;
background: lightblue; background: lightblue;
margin-left: 10px; margin-left: 1ex;
margin-right: 5px; margin-right: 0.5ex;
}
QMenu::indicator
{
width: 18px;
height: 18px;
} }
/* non-exclusive indicator = check box style indicator /* non-exclusive indicator = check box style indicator
(see QActionGroup::setExclusive) */ (see QActionGroup::setExclusive) */
QMenu::indicator:non-exclusive:unchecked QMenu::indicator:non-exclusive:unchecked
{ {
image: url(:/dark/checkbox_unchecked_disabled.svg); border-image: url(:/dark/checkbox_unchecked_disabled.svg);
} }
QMenu::indicator:non-exclusive:unchecked:selected QMenu::indicator:non-exclusive:unchecked:selected
{ {
image: url(:/dark/checkbox_unchecked_disabled.svg); border-image: url(:/dark/checkbox_unchecked_disabled.svg);
} }
QMenu::indicator:non-exclusive:checked QMenu::indicator:non-exclusive:checked
{ {
image: url(:/dark/checkbox_checked.svg); border-image: url(:/dark/checkbox_checked.svg);
} }
QMenu::indicator:non-exclusive:checked:selected QMenu::indicator:non-exclusive:checked:selected
{ {
image: url(:/dark/checkbox_checked.svg); border-image: url(:/dark/checkbox_checked.svg);
} }
/* exclusive indicator = radio button style indicator (see QActionGroup::setExclusive) */ /* exclusive indicator = radio button style indicator (see QActionGroup::setExclusive) */
QMenu::indicator:exclusive:unchecked QMenu::indicator:exclusive:unchecked
{ {
image: url(:/dark/radio_unchecked_disabled.svg); border-image: url(:/dark/radio_unchecked_disabled.svg);
} }
QMenu::indicator:exclusive:unchecked:selected QMenu::indicator:exclusive:unchecked:selected
{ {
image: url(:/dark/radio_unchecked_disabled.svg); border-image: url(:/dark/radio_unchecked_disabled.svg);
} }
QMenu::indicator:exclusive:checked QMenu::indicator:exclusive:checked
{ {
image: url(:/dark/radio_checked.svg); border-image: url(:/dark/radio_checked.svg);
} }
QMenu::indicator:exclusive:checked:selected QMenu::indicator:exclusive:checked:selected
{ {
image: url(:/dark/radio_checked.svg); border-image: url(:/dark/radio_checked.svg);
} }
QMenu::right-arrow QMenu::right-arrow
{ {
margin: 5px; margin: 0.5ex;
image: url(:/dark/right_arrow.svg) border-image: url(:/light/right_arrow.svg);
width: 0.6ex;
height: 0.9ex;
} }
@ -329,13 +325,14 @@ QAbstractItemView
{ {
alternate-background-color: #31363b; alternate-background-color: #31363b;
color: #eff0f1; color: #eff0f1;
border: 1px solid 3A3939; border: 0.1ex solid 3A3939;
border-radius: 2px; border-radius: 0.2ex;
} }
QWidget:focus, QMenuBar:focus QWidget:focus,
QMenuBar:focus
{ {
border: 1px solid #3daee9; border: 0.1ex solid #3daee9;
} }
QTabWidget:focus, QTabWidget:focus,
@ -349,50 +346,51 @@ QSlider:focus
QLineEdit QLineEdit
{ {
background-color: #232629; background-color: #232629;
padding: 5px; padding: 0.5ex;
border-style: solid; border-style: solid;
border: 1px solid #76797c; border: 1px solid #76797c;
border-radius: 2px; border-radius: 0.2ex;
color: #eff0f1; color: #eff0f1;
} }
QGroupBox QGroupBox
{ {
border:1px solid #76797c; border: 0.1ex solid #76797c;
border-radius: 2px; border-radius: 0.2ex;
margin-top: 20px; padding-top: 1ex;
margin-top: 1ex;
} }
QGroupBox::title QGroupBox::title
{ {
subcontrol-origin: margin; subcontrol-origin: margin;
subcontrol-position: top center; subcontrol-position: top center;
padding-left: 10px; padding-left: 0.1ex;
padding-right: 10px; padding-right: 0.1ex;
padding-top: 10px; margin-top: -0.7ex;
} }
QAbstractScrollArea QAbstractScrollArea
{ {
border-radius: 2px; border-radius: 0.2ex;
border: 1px solid #76797c; border: 1px solid #76797c;
background-color: transparent; background-color: transparent;
} }
QScrollBar:horizontal QScrollBar:horizontal
{ {
height: 15px; height: 1.5ex;
margin: 3px 15px 3px 15px; margin: 0.3ex 1.5ex 0.3ex 1.5ex;
border: 1px transparent #2A2929; border: 0.1ex transparent #2A2929;
border-radius: 4px; border-radius: 0.4ex;
background-color: #2A2929; background-color: #2A2929;
} }
QScrollBar::handle:horizontal QScrollBar::handle:horizontal
{ {
background-color: #605F5F; background-color: #605F5F;
min-width: 5px; min-width: 0.5ex;
border-radius: 4px; border-radius: 0.4ex;
} }
QScrollBar::add-line:horizontal QScrollBar::add-line:horizontal

View File

@ -53,7 +53,7 @@ def main():
logging.basicConfig(level=logging.DEBUG) logging.basicConfig(level=logging.DEBUG)
# create the application and the main window # create the application and the main window
app = QtWidgets.QApplication(sys.argv) app = QtWidgets.QApplication(sys.argv)
app.setStyle(QtWidgets.QStyleFactory.create("fusion")) #app.setStyle(QtWidgets.QStyleFactory.create("fusion"))
window = QtWidgets.QMainWindow() window = QtWidgets.QMainWindow()
# setup ui # setup ui

132
light.qss
View File

@ -226,35 +226,35 @@ QMenuBar::item
QMenuBar::item:selected QMenuBar::item:selected
{ {
background: transparent; background: transparent;
border: 1px solid #BAB9B8; border: 0.1ex solid #BAB9B8;
} }
QMenuBar::item:pressed QMenuBar::item:pressed
{ {
border: 1px solid #BAB9B8; border: 0.1ex solid #BAB9B8;
background-color: #33A4DF; background-color: #33A4DF;
color: #31363B; color: #31363B;
margin-bottom:-1px; margin-bottom: -0.1ex;
padding-bottom:1px; padding-bottom: 0.1ex;
} }
QMenu QMenu
{ {
border: 1px solid #BAB9B8; border: 0.1ex solid #BAB9B8;
color: #31363B; color: #31363B;
margin: 2px; margin: 2px;
} }
QMenu::icon QMenu::icon
{ {
margin: 5px; margin: 0.5ex;
} }
QMenu::item QMenu::item
{ {
padding: 5px 30px 5px 30px; padding: 0.5ex 3ex 0.5ex 3ex;
margin-left: 5px; margin-left: 0.5ex;
border: 1px solid transparent; /* reserve space for selection border */ border: 0.1ex solid transparent; /* reserve space for selection border */
} }
QMenu::item:selected QMenu::item:selected
@ -262,56 +262,63 @@ QMenu::item:selected
color: #31363B; color: #31363B;
} }
QMenu::separator { QMenu::separator
height: 2px; {
height: 0.2ex;
background: lightblue; background: lightblue;
margin-left: 10px; margin-left: 1ex;
margin-right: 5px; margin-right: 0.5ex;
}
QMenu::indicator {
width: 18px;
height: 18px;
} }
/* non-exclusive indicator = check box style indicator /* non-exclusive indicator = check box style indicator
(see QActionGroup::setExclusive) */ (see QActionGroup::setExclusive) */
QMenu::indicator:non-exclusive:unchecked { QMenu::indicator:non-exclusive:unchecked
image: url(:/light/checkbox_unchecked_disabled.svg); {
border-image: url(:/light/checkbox_unchecked_disabled.svg);
} }
QMenu::indicator:non-exclusive:unchecked:selected { QMenu::indicator:non-exclusive:unchecked:selected
image: url(:/light/checkbox_unchecked_disabled.svg); {
border-image: url(:/light/checkbox_unchecked_disabled.svg);
} }
QMenu::indicator:non-exclusive:checked { QMenu::indicator:non-exclusive:checked
image: url(:/light/checkbox_checked.svg); {
border-image: url(:/light/checkbox_checked.svg);
} }
QMenu::indicator:non-exclusive:checked:selected { QMenu::indicator:non-exclusive:checked:selected
image: url(:/light/checkbox_checked.svg); {
border-image: url(:/light/checkbox_checked.svg);
} }
/* exclusive indicator = radio button style indicator (see QActionGroup::setExclusive) */ /* exclusive indicator = radio button style indicator (see QActionGroup::setExclusive) */
QMenu::indicator:exclusive:unchecked { QMenu::indicator:exclusive:unchecked
image: url(:/light/radio_unchecked_disabled.svg); {
border-image: url(:/light/radio_unchecked_disabled.svg);
} }
QMenu::indicator:exclusive:unchecked:selected { QMenu::indicator:exclusive:unchecked:selected
image: url(:/light/radio_unchecked_disabled.svg); {
border-image: url(:/light/radio_unchecked_disabled.svg);
} }
QMenu::indicator:exclusive:checked { QMenu::indicator:exclusive:checked
image: url(:/light/radio_checked.svg); {
border-image: url(:/light/radio_checked.svg);
} }
QMenu::indicator:exclusive:checked:selected { QMenu::indicator:exclusive:checked:selected
image: url(:/light/radio_checked.svg); {
border-image: url(:/light/radio_checked.svg);
} }
QMenu::right-arrow { QMenu::right-arrow
margin: 5px; {
image: url(:/light/right_arrow.svg) margin: 0.5ex;
border-image: url(:/light/right_arrow.svg);
width: 0.6ex;
height: 0.9ex;
} }
@ -325,16 +332,20 @@ QAbstractItemView
{ {
alternate-background-color: #EFF0F1; alternate-background-color: #EFF0F1;
color: #31363B; color: #31363B;
border: 1px solid 3A3939; border: 0.1ex solid 3A3939;
border-radius: 2px; border-radius: 0.2ex;
} }
QWidget:focus, QMenuBar:focus QWidget:focus,
QMenuBar:focus
{ {
border: 1px solid #33A4DF; border: 0.1ex solid #33A4DF;
} }
QTabWidget:focus, QCheckBox:focus, QRadioButton:focus, QSlider:focus QTabWidget:focus,
QCheckBox:focus,
QRadioButton:focus,
QSlider:focus
{ {
border: none; border: none;
} }
@ -342,48 +353,51 @@ QTabWidget:focus, QCheckBox:focus, QRadioButton:focus, QSlider:focus
QLineEdit QLineEdit
{ {
background-color: #FCFCFC; background-color: #FCFCFC;
padding: 5px; padding: 0.5ex;
border-style: solid; border-style: solid;
border: 1px solid #BAB9B8; border: 1px solid #BAB9B8;
border-radius: 2px; border-radius: 0.2ex;
color: #31363B; color: #31363B;
} }
QGroupBox { QGroupBox
border:1px solid #BAB9B8; {
border-radius: 2px; border: 0.1ex solid #BAB9B8;
margin-top: 20px; border-radius: 0.2ex;
padding-top: 1ex;
margin-top: 1ex;
} }
QGroupBox::title { QGroupBox::title
{
subcontrol-origin: margin; subcontrol-origin: margin;
subcontrol-position: top center; subcontrol-position: top center;
padding-left: 10px; padding-left: 0.1ex;
padding-right: 10px; padding-right: 0.1ex;
padding-top: 10px; margin-top: -0.7ex;
} }
QAbstractScrollArea QAbstractScrollArea
{ {
border-radius: 2px; border-radius: 0.2ex;
border: 1px solid #BAB9B8; border: 1px solid #BAB9B8;
background-color: transparent; background-color: transparent;
} }
QScrollBar:horizontal QScrollBar:horizontal
{ {
height: 15px; height: 1.5ex;
margin: 3px 15px 3px 15px; margin: 0.3ex 1.5ex 0.3ex 1.5ex;
border: 1px transparent #2A2929; border: 0.1ex transparent #2A2929;
border-radius: 4px; border-radius: 0.4ex;
background-color: #2A2929; background-color: #2A2929;
} }
QScrollBar::handle:horizontal QScrollBar::handle:horizontal
{ {
background-color: #605F5F; background-color: #605F5F;
min-width: 5px; min-width: 0.5ex;
border-radius: 4px; border-radius: 0.4ex;
} }
QScrollBar::add-line:horizontal QScrollBar::add-line:horizontal

View File

@ -1,3 +1,3 @@
<svg width="6" height="9"> <svg x="0px" y="0px" width="6px" height="9px" viewBox="0 0 6 9" enable-background="new 0 0 6 9" xml:space="preserve">
<path d="m 0.9166972,1.1894593 3.310321,3.3105408 -3.3117417,3.3105408 c -0.157702,0.1577125 -0.157702,0.4134624 0,0.5711749 0.157702,0.1577123 0.4134349,0.1577123 0.5711369,0 l 3.5973102,-3.5961283 0,0 0,0 c 0.1577019,-0.1577124 0.1577019,-0.4134624 0,-0.5711748 L 1.4864134,0.61828437 c -0.157702,-0.1577124 -0.4134349,-0.1577124 -0.5711369,0 -0.1562813,0.1577125 -0.1562813,0.41346243 0.00142,0.57117493 z" fill="#31363B"/> <path d="m 0.9166972,1.1894593 3.310321,3.3105408 -3.3117417,3.3105408 c -0.157702,0.1577125 -0.157702,0.4134624 0,0.5711749 0.157702,0.1577123 0.4134349,0.1577123 0.5711369,0 l 3.5973102,-3.5961283 0,0 0,0 c 0.1577019,-0.1577124 0.1577019,-0.4134624 0,-0.5711748 L 1.4864134,0.61828437 c -0.157702,-0.1577124 -0.4134349,-0.1577124 -0.5711369,0 -0.1562813,0.1577125 -0.1562813,0.41346243 0.00142,0.57117493 z" fill="#31363B"/>
</svg> </svg>

Before

Width:  |  Height:  |  Size: 463 B

After

Width:  |  Height:  |  Size: 554 B

View File

@ -51,7 +51,7 @@ def main():
logging.basicConfig(level=logging.DEBUG) logging.basicConfig(level=logging.DEBUG)
# create the application and the main window # create the application and the main window
app = QtWidgets.QApplication(sys.argv) app = QtWidgets.QApplication(sys.argv)
app.setStyle(QtWidgets.QStyleFactory.create("fusion")) #app.setStyle(QtWidgets.QStyleFactory.create("fusion"))
window = QtWidgets.QMainWindow() window = QtWidgets.QMainWindow()
# setup ui # setup ui