From 38be0d13830efd2d98281c645c3a60afe05ffece Mon Sep 17 00:00:00 2001 From: Qt by Nokia Date: Wed, 27 Apr 2011 12:05:43 +0200 Subject: Initial import from the monolithic Qt. This is the beginning of revision history for this module. If you want to look at revision history older than this, please refer to the Qt Git wiki for how to use Git history grafting. At the time of writing, this wiki is located here: http://qt.gitorious.org/qt/pages/GitIntroductionWithQt If you have already performed the grafting and you don't see any history beyond this commit, try running "git log" with the "--follow" argument. Branched from the monolithic repo, Qt master branch, at commit 896db169ea224deb96c59ce8af800d019de63f12 --- demos/embedded/styledemo/files/add.png | Bin 0 -> 1474 bytes demos/embedded/styledemo/files/application.qss | 125 ++++++++++++++++++++++ demos/embedded/styledemo/files/blue.qss | 38 +++++++ demos/embedded/styledemo/files/khaki.qss | 99 ++++++++++++++++++ demos/embedded/styledemo/files/nature_1.jpg | Bin 0 -> 167443 bytes demos/embedded/styledemo/files/nostyle.qss | 0 demos/embedded/styledemo/files/remove.png | Bin 0 -> 865 bytes demos/embedded/styledemo/files/transparent.qss | 139 +++++++++++++++++++++++++ 8 files changed, 401 insertions(+) create mode 100755 demos/embedded/styledemo/files/add.png create mode 100644 demos/embedded/styledemo/files/application.qss create mode 100644 demos/embedded/styledemo/files/blue.qss create mode 100644 demos/embedded/styledemo/files/khaki.qss create mode 100644 demos/embedded/styledemo/files/nature_1.jpg create mode 100644 demos/embedded/styledemo/files/nostyle.qss create mode 100755 demos/embedded/styledemo/files/remove.png create mode 100644 demos/embedded/styledemo/files/transparent.qss (limited to 'demos/embedded/styledemo/files') diff --git a/demos/embedded/styledemo/files/add.png b/demos/embedded/styledemo/files/add.png new file mode 100755 index 0000000000..fc5c16d4c8 Binary files /dev/null and b/demos/embedded/styledemo/files/add.png differ diff --git a/demos/embedded/styledemo/files/application.qss b/demos/embedded/styledemo/files/application.qss new file mode 100644 index 0000000000..432fe6bc76 --- /dev/null +++ b/demos/embedded/styledemo/files/application.qss @@ -0,0 +1,125 @@ +QWidget#StyleWidget +{ + background-color: none; + background-image: url(icons:nature_1.jpg); +} + +QLabel, QAbstractButton +{ + font: bold; + color: beige; +} + +QAbstractButton +{ + background: qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 rgba(173,216,230,60%), stop:1 rgba(0,0,139,60%) ); + border-color: black; + border-style: solid; + border-width: 3px; + border-radius: 6px; +} + +QAbstractButton:pressed, QAbstractButton:checked +{ + background: qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 rgba(0,0,139,60%), stop:1 rgba(173,216,230,60%) ); +} + +QSpinBox { + padding-left: 24px; + padding-right: 24px; + border-color: darkkhaki; + border-style: solid; + border-radius: 5; + border-width: 3; +} + +QSpinBox::up-button +{ + subcontrol-origin: padding; + subcontrol-position: right; /* position at the top right corner */ + width: 24px; + height: 24px; + border-width: 3px; + +} + +QSpinBox::up-arrow +{ + image: url(icons:add.png); + width: 18px; + height: 18px; +} + + +QSpinBox::down-button +{ + subcontrol-origin: border; + subcontrol-position: left; + width: 24px; + height: 24px; + border-width: 3px; +} + +QSpinBox::down-arrow +{ + image: url(icons:remove.png); + width: 18px; + height: 18px; +} + + +QScrollBar:horizontal +{ + border: 1px solid black; + background: qlineargradient(x1:0, y1:0, x2:1, y2:0, stop:0 rgba(0,0,139,60%), stop:1 rgba(173,216,230,60%) ); + height: 15px; + margin: 0px 20px 0 20px; +} + +QScrollBar::handle:horizontal +{ + border: 1px solid black; + background: rgba(0,0,139,60%); + min-width: 20px; +} + +QScrollBar::add-line:horizontal +{ + border: 1px solid black; + background: rgba(0,0,139,60%); + width: 20px; + subcontrol-position: right; + subcontrol-origin: margin; +} + +QScrollBar::sub-line:horizontal +{ + border: 1px solid black; + background: rgba(0,0,139,60%); + width: 20px; + subcontrol-position: left; + subcontrol-origin: margin; +} + +QScrollBar:left-arrow:horizontal, QScrollBar::right-arrow:horizontal +{ + border: none; + width: 16px; + height: 16px; +} + +QScrollBar:left-arrow:horizontal +{ + image: url(icons:add.png) +} + +QScrollBar::right-arrow:horizontal +{ + image: url(icons:remove.png) +} + +QScrollBar::add-page:horizontal, QScrollBar::sub-page:horizontal +{ + background: none; +} + diff --git a/demos/embedded/styledemo/files/blue.qss b/demos/embedded/styledemo/files/blue.qss new file mode 100644 index 0000000000..ac8671b5e4 --- /dev/null +++ b/demos/embedded/styledemo/files/blue.qss @@ -0,0 +1,38 @@ +* +{ + color: beige; +} + +QLabel, QAbstractButton +{ + font: bold; + color: yellow; +} + +QFrame +{ + background-color: rgba(96,96,255,60%); + border-color: rgb(32,32,196); + border-width: 3px; + border-style: solid; + border-radius: 5; + padding: 3px; +} + +QAbstractButton +{ + background: qlineargradient(x1:0, y1:0, x2:0, y2:1, + stop:0 lightblue, stop:0.5 darkblue); + border-width: 3px; + border-color: darkblue; + border-style: solid; + border-radius: 5; + padding: 3px; +} + +QAbstractButton:pressed +{ + background: qlineargradient(x1:0, y1:0, x2:0, y2:1, + stop:0.5 darkblue, stop:1 lightblue); + border-color: beige; +} diff --git a/demos/embedded/styledemo/files/khaki.qss b/demos/embedded/styledemo/files/khaki.qss new file mode 100644 index 0000000000..b0d4a0fa6f --- /dev/null +++ b/demos/embedded/styledemo/files/khaki.qss @@ -0,0 +1,99 @@ + +QWidget#StartScreen, QWidget#MainWidget { + border: none; +} + +QWidget#StartScreen, .QFrame { + background-color: beige; +} + +QPushButton, QToolButton { + background-color: palegoldenrod; + border-width: 2px; + border-color: darkkhaki; + border-style: solid; + border-radius: 5; + padding: 3px; + /* min-width: 96px; */ + /* min-height: 48px; */ +} + +QPushButton:hover, QToolButton:hover { + background-color: khaki; +} + +QPushButton:pressed, QToolButton:pressed { + padding-left: 5px; + padding-top: 5px; + background-color: #d0d67c; +} + +QLabel, QAbstractButton { + font: italic "Times New Roman"; +} + +QFrame, QLabel#title { + border-width: 2px; + padding: 1px; + border-style: solid; + border-color: darkkhaki; + border-radius: 5px; +} + +QFrame:focus { + border-width: 3px; + padding: 0px; +} + + +QLabel { + border: none; + padding: 0; + background: none; +} + +QLabel#title { + font: 32px bold; +} + +QSpinBox { + padding-left: 24px; + padding-right: 24px; + border-color: darkkhaki; + border-style: solid; + border-radius: 5; + border-width: 3; +} + +QSpinBox::up-button +{ + subcontrol-origin: padding; + subcontrol-position: right; /* position at the top right corner */ + width: 24px; + height: 24px; + border-width: 3px; + border-image: url(:/files/spindownpng) 1; +} + +QSpinBox::up-arrow { + image: url(:/files/add.png); + width: 12px; + height: 12px; + } + + +QSpinBox::down-button +{ + subcontrol-origin: border; + subcontrol-position: left; + width: 24px; + height: 24px; + border-width: 3px; + border-image: url(:/files/spindownpng) 1; +} + +QSpinBox::down-arrow { + image: url(:/files/remove.png); + width: 12px; + height: 12px; + } diff --git a/demos/embedded/styledemo/files/nature_1.jpg b/demos/embedded/styledemo/files/nature_1.jpg new file mode 100644 index 0000000000..3a04edb96a Binary files /dev/null and b/demos/embedded/styledemo/files/nature_1.jpg differ diff --git a/demos/embedded/styledemo/files/nostyle.qss b/demos/embedded/styledemo/files/nostyle.qss new file mode 100644 index 0000000000..e69de29bb2 diff --git a/demos/embedded/styledemo/files/remove.png b/demos/embedded/styledemo/files/remove.png new file mode 100755 index 0000000000..a0ab1fa21a Binary files /dev/null and b/demos/embedded/styledemo/files/remove.png differ diff --git a/demos/embedded/styledemo/files/transparent.qss b/demos/embedded/styledemo/files/transparent.qss new file mode 100644 index 0000000000..b38eb366f4 --- /dev/null +++ b/demos/embedded/styledemo/files/transparent.qss @@ -0,0 +1,139 @@ +QWidget#StyleWidget +{ + background-color: none; + background-image: url(:/files/nature_1.jpg); +} + +QLabel, QAbstractButton +{ + color: beige; +} + +QFrame, QLabel#title { + border-width: 2px; + padding: 1px; + border-style: solid; + border-color: black; + border-radius: 5px; +} + +QFrame:focus { + border-width: 3px; + padding: 0px; +} + + + +QAbstractButton +{ + background: qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 rgba(173,216,230,60%), stop:1 rgba(0,0,139,60%) ); + border-color: black; + border-style: solid; + border-width: 3px; + border-radius: 6px; +} + +QAbstractButton:pressed, QAbstractButton:checked +{ + background: qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 rgba(0,0,139,60%), stop:1 rgba(173,216,230,60%) ); +} + +QSpinBox { + padding-left: 24px; + padding-right: 24px; + border-color: darkkhaki; + border-style: solid; + border-radius: 5; + border-width: 3; +} + +QSpinBox::up-button +{ + subcontrol-origin: padding; + subcontrol-position: right; /* position at the top right corner */ + width: 24px; + height: 24px; + border-width: 3px; + +} + +QSpinBox::up-arrow +{ + image: url(:/files/add.png); + width: 18px; + height: 18px; +} + + +QSpinBox::down-button +{ + subcontrol-origin: border; + subcontrol-position: left; + width: 24px; + height: 24px; + border-width: 3px; +} + +QSpinBox::down-arrow +{ + image: url(:/files/remove.png); + width: 18px; + height: 18px; +} + + +QScrollBar:horizontal +{ + border: 1px solid black; + background: qlineargradient(x1:0, y1:0, x2:1, y2:0, stop:0 rgba(0,0,139,60%), stop:1 rgba(173,216,230,60%) ); + height: 15px; + margin: 0px 20px 0 20px; +} + +QScrollBar::handle:horizontal +{ + border: 1px solid black; + background: rgba(0,0,139,60%); + min-width: 20px; +} + +QScrollBar::add-line:horizontal +{ + border: 1px solid black; + background: rgba(0,0,139,60%); + width: 20px; + subcontrol-position: right; + subcontrol-origin: margin; +} + +QScrollBar::sub-line:horizontal +{ + border: 1px solid black; + background: rgba(0,0,139,60%); + width: 20px; + subcontrol-position: left; + subcontrol-origin: margin; +} + +QScrollBar:left-arrow:horizontal, QScrollBar::right-arrow:horizontal +{ + border: none; + width: 16px; + height: 16px; +} + +QScrollBar:left-arrow:horizontal +{ + image: url(:/files/add.png) +} + +QScrollBar::right-arrow:horizontal +{ + image: url(:/files/remove.png) +} + +QScrollBar::add-page:horizontal, QScrollBar::sub-page:horizontal +{ + background: none; +} + -- cgit v1.2.3