Skip to content
Snippets Groups Projects
Commit 69f6742d authored by Thomas Hartmann's avatar Thomas Hartmann
Browse files

QmlDesigner.propertyEditor: style sheet tweaks for the new style

parent 68f356e3
No related branches found
No related tags found
No related merge requests found
QPushButton {
border-image: url(:/qmldesigner/images/apply.png) 3;
border-width: 3;
}
QPushButton:hover {
border-image: url(:/qmldesigner/images/applybright.png) 3;
}
QPushButton {
border-image: url(:/qmldesigner/images/cancel.png) 3;
border-width: 3;
}
QPushButton:hover {
border-image: url(:/qmldesigner/images/cancelbright.png) 3;
}
...@@ -30,7 +30,7 @@ QLabel { ...@@ -30,7 +30,7 @@ QLabel {
QScrollArea { QScrollArea {
border: 0px; border: 0px;
border-radius: 0px; border-radius: 0px;
background-color: #707070; background-color: #4a4a4a;
} }
QGroupBox QGroupBox
...@@ -38,7 +38,6 @@ QGroupBox ...@@ -38,7 +38,6 @@ QGroupBox
background-color: qlineargradient(x1: 0, y1: 0, x2: 1, y2: 0, background-color: qlineargradient(x1: 0, y1: 0, x2: 1, y2: 0,
stop: 0 #4a4a4a, stop: 1 #4f4f4f); stop: 0 #4a4a4a, stop: 1 #4f4f4f);
border: 1px solid #4F4F4F; border: 1px solid #4F4F4F;
border-radius: 5px;
color: white; color: white;
font: bold font: bold
} }
...@@ -49,55 +48,63 @@ QLineEdit ...@@ -49,55 +48,63 @@ QLineEdit
border: 2px solid #0F0F0F; border: 2px solid #0F0F0F;
border-radius: 6px; border-radius: 6px;
border-width: 1; border-width: 1;
max-height: 16px;
min-height: 16px;
background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
stop: 0 #2c2c2c, stop: 1 #333333); stop: 0 #2c2c2c, stop: 1 #333333);
} }
QTextEdit QTextEdit
{ {
border: 2px solid #8F8F8F; border: 2px solid #0F0F0F;
border-radius: 10px; border-radius: 6px;
padding: 0 8px; color: white;
background-color: white; padding: 8 8px;
selection-background-color: darkgray; background-color: white;
selection-background-color: lightgray;
background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
stop: 0 #2c2c2c, stop: 1 #333333);
} }
QSpinBox QSpinBox
{ {
font-size: 11px; font-size: 11px;
color: white; color: white;
padding-right: 20px; /* make room for the arrows */ padding-right: 4px;
padding-top: 2px; /* make room for the arrows */ padding-top: 2px;
padding-bottom: 2px; /* make room for the arrows */ padding-bottom: 2px;
padding-left: 20px;
border: 2px solid #0F0F0F; border: 2px solid #0F0F0F;
border-radius: 6px; border-radius: 6px;
border-width: 1; border-width: 1;
background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
stop: 0 #2c2c2c, stop: 1 #333333); stop: 0 #2c2c2c, stop: 1 #333333);
min-height: 14px;
max-height: 14px; max-height: 16px;
min-height: 16px;
} }
QDoubleSpinBox QDoubleSpinBox
{ {
font-size: 11px; font-size: 11px;
color: white; color: white;
padding-right: 20px; /* make room for the arrows */ padding-right: 4px;
padding-top: 2px; /* make room for the arrows */ padding-top: 2px;
padding-bottom: 2px; /* make room for the arrows */ padding-bottom: 2px;
padding-left: 20px;
border: 2px solid #0F0F0F; border: 2px solid #0F0F0F;
border-radius: 6px; border-radius: 6px;
border-width: 1; border-width: 1;
background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
stop: 0 #2c2c2c, stop: 1 #333333); stop: 0 #2c2c2c, stop: 1 #333333);
max-height: 14px; max-height: 16px;
min-height: 14px; min-height: 16px;
} }
QSpinBox::down-button { QSpinBox::down-button {
subcontrol-origin: border; subcontrol-origin: border;
subcontrol-position: bottom right; /* position at bottom right corner */ subcontrol-position: bottom right;
border-image: url(:/qmldesigner/images/spindown.png) 1; border-image: url(:/qmldesigner/images/spindown.png) 1;
width: 16px; width: 16px;
...@@ -134,7 +141,7 @@ QSpinBox::up-button:pressed { ...@@ -134,7 +141,7 @@ QSpinBox::up-button:pressed {
QDoubleSpinBox::down-button { QDoubleSpinBox::down-button {
subcontrol-origin: border; subcontrol-origin: border;
subcontrol-position: bottom right; /* position at bottom right corner */ subcontrol-position: bottom right;
border-image: url(:/qmldesigner/images/spindown.png) 1; border-image: url(:/qmldesigner/images/spindown.png) 1;
width: 16px; width: 16px;
...@@ -151,7 +158,7 @@ QDoubleSpinBox::down-button:pressed { ...@@ -151,7 +158,7 @@ QDoubleSpinBox::down-button:pressed {
QDoubleSpinBox::up-button { QDoubleSpinBox::up-button {
subcontrol-origin: border; subcontrol-origin: border;
subcontrol-position: top right; /* position at bottom right corner */ subcontrol-position: top right;
border-image: url(:/qmldesigner/images/spinup.png) 1; border-image: url(:/qmldesigner/images/spinup.png) 1;
width: 16px; width: 16px;
...@@ -209,17 +216,16 @@ QComboBox[editable="true"]::drop-down:on, QMenuBar::item:on { ...@@ -209,17 +216,16 @@ QComboBox[editable="true"]::drop-down:on, QMenuBar::item:on {
border-width: 3; border-width: 3;
} }
/* Customize read-only comboboxes. */
QComboBox QComboBox
{ {
font-size: 11px; font-size: 11px;
color: white; color: white;
min-width: 20px;
} }
QComboBox[editable="false"] { QComboBox[editable="false"] {
padding-left: 3px; padding-left: 3px;
padding-right: 20px; /* space for the arrow */ padding-right: 10px;
} }
QComboBox[editable="false"]::drop-down { QComboBox[editable="false"]::drop-down {
...@@ -228,25 +234,22 @@ QComboBox[editable="false"]::drop-down { ...@@ -228,25 +234,22 @@ QComboBox[editable="false"]::drop-down {
width: 15px; width: 15px;
border-left-style: solid; border-left-style: solid;
border-left-color: black; border-left-color: black;
border-left-width: 1px; border-left-width: 0px;
} }
QComboBox[editable="false"]::down-arrow { QComboBox[editable="false"]::down-arrow {
subcontrol-origin: content; subcontrol-origin: content;
subcontrol-position: center; subcontrol-position: center;
position: relative; position: relative;
left: 1px; /* 1 pixel dropdown border */ left: 1px;
} }
/* The combobox arrow is on when the popup is open. */
QComboBox[editable="false"]::down-arrow:on { QComboBox[editable="false"]::down-arrow:on {
position: relative; position: relative;
top: 1px; top: 1px;
left: 2px; left: 2px;
} }
/* Customize editable comboboxes. */
QComboBox[editable="true"] { QComboBox[editable="true"] {
padding-right: 16px; padding-right: 16px;
} }
...@@ -264,11 +267,10 @@ QComboBox[editable="true"]::drop-down { ...@@ -264,11 +267,10 @@ QComboBox[editable="true"]::drop-down {
QComboBox[editable="true"]::drop-down, QComboBox[editable="true"]::drop-down,
QComboBox[editable="true"]::drop-down:hover, QComboBox[editable="true"]::drop-down:hover,
QComboBox[editable="true"]::drop-down:on { QComboBox[editable="true"]::drop-down:on {
border-width: 0px; border-width: 0px;
border-left-width: 3px; /* we need only left and center part */ border-left-width: 3px;
} }
/* Shift the arrow when it's open. */
QComboBox[editable="true"]::down-arrow:on { QComboBox[editable="true"]::down-arrow:on {
position: relative; position: relative;
top: 1px; top: 1px;
...@@ -308,33 +310,26 @@ QRadioButton::indicator:checked:pressed { ...@@ -308,33 +310,26 @@ QRadioButton::indicator:checked:pressed {
image: url(:/qmldesigner/images/radiobutton_checked_pressed.png); image: url(:/qmldesigner/images/radiobutton_checked_pressed.png);
} }
/* Customize arrows. */ QSpinBox::down-arrow, QSpinBox::menu-indicator, QDoubleSpinBox::down-arrow, QDoubleSpinBox::menu-indicator , QComboBox::menu-indicator, QComboBox::down-arrow {
*::down-arrow, *::menu-indicator {
image: url(:/qmldesigner/images/down_arrow.png); image: url(:/qmldesigner/images/down_arrow.png);
width: 7px; width: 7px;
height: 7px; height: 7px;
} }
*::down-arrow:disabled, *::down-arrow:off { QSpinBox::down-arrow:disabled, QSpinBox::down-arrow:off, QDoubleSpinBox::down-arrow:disabled, QDoubleSpinBox::down-arrow:off {
image: url(:/qmldesigner/images/down_arrow_disabled.png); image: url(:/qmldesigner/images/down_arrow_disabled.png);
} }
*::up-arrow { QSpinBox::up-arrow, QDoubleSpinBox::up-arrow {
image: url(:/qmldesigner/images/up_arrow.png); image: url(:/qmldesigner/images/up_arrow.png);
width: 7px; width: 7px;
height: 7px; height: 7px;
} }
*::up-arrow:disabled, *::up-arrow:off { QSpinBox::up-arrow:disabled, QSpinBox::up-arrow:off, QDoubleSpinBox::up-arrow:disabled, QDoubleSpinBox::up-arrow:off {
image: url(:/qmldesigner/images/up_arrow_disabled.png); image: url(:/qmldesigner/images/up_arrow_disabled.png);
} }
/* Customize push buttons and comboboxes. Our read-only combobox
is very similar to a push button, so they share the same border image. */
/* Customize check boxes. */
QCheckBox { QCheckBox {
spacing: 8px; spacing: 8px;
font-size: 11px font-size: 11px
...@@ -370,25 +365,23 @@ QCheckBox::indicator:checked:pressed { ...@@ -370,25 +365,23 @@ QCheckBox::indicator:checked:pressed {
} }
QMenu { QMenu {
background-color: #494949; /* sets background of the menu */ background-color: #494949;
border: 1px solid black; border: 1px solid black;
margin: 0px; /* some spacing around the menu */ margin: 0px;
color: #cacaca; color: #cacaca;
} }
QMenu::item { QMenu::item {
/* sets background of menu item. set this to something non-transparent
if you want menu color and menu item color to be different */
background-color: transparent; background-color: transparent;
padding: 2px 25px 2px 20px; padding: 2px 25px 2px 20px;
} }
QMenu::item:selected { /* when user selects item using mouse or keyboard */ QMenu::item:selected {
background-color: #d2d2d2; background-color: #d2d2d2;
padding: 2px; padding: 2px;
color: #404040; color: #404040;
border-radius: 4px; border-radius: 4px;
padding: 2px 25px 2px 20px; padding: 2px 25px 2px 20px;
} }
QMenu::separator { QMenu::separator {
height: 1px; height: 1px;
...@@ -398,13 +391,13 @@ QMenu::separator { ...@@ -398,13 +391,13 @@ QMenu::separator {
} }
QComboBox QAbstractItemView { QComboBox QAbstractItemView {
show-decoration-selected: 1; /* make the selection span the entire width of the view */ show-decoration-selected: 1;
background-color: #494949; /* sets background of the menu */ background-color: #494949;
border: 1px solid black; border: 1px solid black;
margin: 0px; /* some spacing around the menu */ margin: 0px;
color: #cacaca; color: #cacaca;
selection-background-color: #d2d2d2; selection-background-color: #d2d2d2;
selection-color: #404040; selection-color: #404040;
} }
QSlider::groove:horizontal { QSlider::groove:horizontal {
......
...@@ -8,6 +8,7 @@ QCheckBox { ...@@ -8,6 +8,7 @@ QCheckBox {
QToolButton { QToolButton {
color: white; color: white;
font: bold; font: bold;
background: #5f5f5f;
} }
QCheckBox::indicator { QCheckBox::indicator {
......
QPushButton { QPushButton {
border: 0px solid #6f6f61; border-image: none;
border-image: url(:/images/button2_normal.png) 2 2 2 2; min-width: 40px;
border-radius: 1px;
min-width: 20px;
min-height: 20px; min-height: 20px;
margin: 0px 0 2px 0; margin: 0px 0 0px 0;
border: 1px solid #0F0F0F;
background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
stop: 0 #3c3c3c, stop: 1 #444444);
color: #EEEEEE;
font: bold;
}
QPushButton:hover {
border: none; /* no border for a flat push button */
background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
stop: 0 #3c3c3c, stop: 1 #666666);
} }
QPushButton::checked QPushButton::checked
{ {
border-image: url(:/images/button2_pressed.png) 2 2 2 2; border: none; /* no border for a flat push button */
border: 1px solid #4f4f41; background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
stop: 0 #EFEFEF, stop: 1 #EEEEEE);
color: #3c3c3c;
}
QPushButton::checked :hover
{
border: none; /* no border for a flat push button */
background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
stop: 0 #FFFFFF, stop: 1 #FEFEFE);
} }
QPushButton:pressed {
border-image: url(:/images/button2_pressed.png) 2 2 2 2;
QPushButton:pressed {
background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
stop: 0 #EFEFEF, stop: 1 #EEEEEE);
} }
QPushButton:flat { QPushButton:flat {
...@@ -23,10 +44,10 @@ QPushButton { ...@@ -23,10 +44,10 @@ QPushButton {
} }
QPushButton:default { QPushButton:default {
border-image: url(:/images/button2_normal.png) 2 2 2 2;
background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
stop: 0 #2c2c2c, stop: 1 #333333);
} }
QPushButton:hover {
border-image: url(:/images/button2_hovered.png) 2 2 2 2;
}
\ No newline at end of file
...@@ -5,4 +5,6 @@ QLineEdit { ...@@ -5,4 +5,6 @@ QLineEdit {
border-width: 2; border-width: 2;
background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
stop: 0 #2c2c2c, stop: 1 #333333); stop: 0 #2c2c2c, stop: 1 #333333);
max-height: 16px;
min-height: 16px;
} }
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment