Changeset 561 for trunk/doc/src/snippets/code/doc_src_stylesheet.qdoc
- Timestamp:
- Feb 11, 2010, 11:19:06 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
-
Property svn:mergeinfo
set to (toggle deleted branches)
/branches/vendor/nokia/qt/4.6.1 merged eligible /branches/vendor/nokia/qt/current merged eligible /branches/vendor/trolltech/qt/current 3-149
-
Property svn:mergeinfo
set to (toggle deleted branches)
-
trunk/doc/src/snippets/code/doc_src_stylesheet.qdoc
r2 r561 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 1 42 //! [0] 2 43 QLineEdit { background: yellow } … … 125 166 UL OL+LI {} /* a=0 b=0 c=3 -> specificity = 3 */ 126 167 H1 + *[REL=up]{} /* a=0 b=1 c=1 -> specificity = 11 */ 127 UL OL LI.red {} /* a=0 b=1 c=3 -> specificity = 13 */ 168 UL OL LI.red {} /* a=0 b=1 c=3 -> specificity = 13 */ 128 169 LI.red.level {} /* a=0 b=2 c=1 -> specificity = 21 */ 129 170 #x34y {} /* a=1 b=0 c=0 -> specificity = 100 */ … … 220 261 221 262 //! [35] 222 QLabel { 263 QLabel { 223 264 background-image: url(dense6pattern.png); 224 265 background-repeat: repeat-xy; … … 381 422 /* implicitly sets the size of down-button to the size of spindown.png */ 382 423 QSpinBox::down-button { image: url(:/images/spindown.png) } 383 384 QTextEdit { image: url(x1.png) url(x2.png) }385 QTextEdit { image: url(pic1.svg) }386 424 //! [59] 387 425 … … 556 594 /* radial gradient from white to green */ 557 595 QTextEdit { 558 background: qradialgradient(cx:0, cy:0, radius: 1, 596 background: qradialgradient(cx:0, cy:0, radius: 1, 559 597 fx:0.5, fy:0.5, stop:0 white, stop:1 green) 560 } 598 } 561 599 //! [85] 562 600 … … 831 869 top: 1px; 832 870 left: 1px; 833 } 871 } 834 872 //! [109] 835 873 … … 962 1000 //! [116] 963 1001 QHeaderView::section { 964 background-color: qlineargradient(x1:0, y1:0, x2:0, y2:1, 965 stop:0 #616161, stop: 0.5 #505050, 1002 background-color: qlineargradient(x1:0, y1:0, x2:0, y2:1, 1003 stop:0 #616161, stop: 0.5 #505050, 966 1004 stop: 0.6 #434343, stop:1 #656565); 967 1005 color: white; 968 1006 padding-left: 4px; 969 1007 border: 1px solid #6c6c6c; 1008 1009 1010 1011 1012 970 1013 } 971 1014 … … 1026 1069 1027 1070 QListView::item:selected:!active { 1028 background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, 1071 background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, 1029 1072 stop: 0 #ABAFE5, stop: 1 #8588B2); 1030 1073 } 1031 1074 1032 1075 QListView::item:selected:active { 1033 background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, 1076 background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, 1034 1077 stop: 0 #6a6ea9, stop: 1 #888dd9); 1035 1078 } 1036 1079 1037 1080 QListView::item:hover { 1038 background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, 1081 background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, 1039 1082 stop: 0 #FAFBFE, stop: 1 #DCDEF1); 1040 1083 } … … 1058 1101 QMenu { 1059 1102 background-color: #ABABAB; /* sets background of the menu */ 1060 border: 1px solid black; 1103 border: 1px solid black; 1061 1104 } 1062 1105 1063 1106 QMenu::item { 1064 /* sets background of menu item. set this to something non-transparent 1107 /* sets background of menu item. set this to something non-transparent 1065 1108 if you want menu color and menu item color to be different */ 1066 background-color: transparent; 1109 background-color: transparent; 1067 1110 } 1068 1111 … … 1093 1136 border: 1px inset gray; 1094 1137 position: absolute; 1095 top: 1px; 1096 right: 1px; 1097 bottom: 1px; 1138 top: 1px; 1139 right: 1px; 1140 bottom: 1px; 1098 1141 left: 1px; 1099 1142 } … … 1102 1145 height: 2px; 1103 1146 background: lightblue; 1104 margin-left: 10px; 1147 margin-left: 10px; 1105 1148 margin-right: 5px; 1106 1149 } … … 1206 1249 border: 2px solid #8f8f91; 1207 1250 border-radius: 6px; 1208 background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, 1251 background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, 1209 1252 stop: 0 #f6f7fa, stop: 1 #dadbde); 1210 1253 min-width: 80px; … … 1212 1255 1213 1256 QPushButton:pressed { 1214 background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, 1257 background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, 1215 1258 stop: 0 #dadbde, stop: 1 #f6f7fa); 1216 1259 } … … 1228 1271 //! [130] 1229 1272 QPushButton:open { /* when the button has its menu open */ 1230 background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, 1273 background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, 1231 1274 stop: 0 #dadbde, stop: 1 #f6f7fa); 1232 1275 } 1233 1276 1234 QPushButton::menu-indicator { 1277 QPushButton::menu-indicator { 1235 1278 image: url(menu_indicator.png); 1236 subcontrol-origin: padding; 1279 subcontrol-origin: padding; 1237 1280 subcontrol-position: bottom right; 1238 1281 } 1239 1282 1240 1283 QPushButton::menu-indicator:pressed, QPushButton::menu-indicator:open { 1241 position: relative; 1284 position: relative; 1242 1285 top: 2px; left: 2px; /* shift the arrow by 2 px */ 1243 1286 } … … 1539 1582 height: 2px; 1540 1583 } 1584 1585 1586 1587 1588 1541 1589 //! [142] 1542 1590 … … 1570 1618 } 1571 1619 1572 /* Style the tab using the tab sub-control. Note that 1620 /* Style the tab using the tab sub-control. Note that 1573 1621 it reads QTabBar _not_ QTabWidget */ 1574 1622 QTabBar::tab { 1575 background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, 1576 stop: 0 #E1E1E1, stop: 0.4 #DDDDDD, 1623 background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, 1624 stop: 0 #E1E1E1, stop: 0.4 #DDDDDD, 1577 1625 stop: 0.5 #D8D8D8, stop: 1.0 #D3D3D3); 1578 1626 border: 2px solid #C4C4C3; … … 1585 1633 1586 1634 QTabBar::tab:selected, QTabBar::tab:hover { 1587 background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, 1588 stop: 0 #fafafa, stop: 0.4 #f4f4f4, 1635 background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, 1636 stop: 0 #fafafa, stop: 0.4 #f4f4f4, 1589 1637 stop: 0.5 #e7e7e7, stop: 1.0 #fafafa); 1590 1638 } … … 1610 1658 } 1611 1659 1612 /* Style the tab using the tab sub-control. Note that 1660 /* Style the tab using the tab sub-control. Note that 1613 1661 it reads QTabBar _not_ QTabWidget */ 1614 1662 QTabBar::tab { 1615 background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, 1616 stop: 0 #E1E1E1, stop: 0.4 #DDDDDD, 1663 background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, 1664 stop: 0 #E1E1E1, stop: 0.4 #DDDDDD, 1617 1665 stop: 0.5 #D8D8D8, stop: 1.0 #D3D3D3); 1618 1666 border: 2px solid #C4C4C3; … … 1625 1673 1626 1674 QTabBar::tab:selected, QTabBar::tab:hover { 1627 background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, 1628 stop: 0 #fafafa, stop: 0.4 #f4f4f4, 1675 background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, 1676 stop: 0 #fafafa, stop: 0.4 #f4f4f4, 1629 1677 stop: 0.5 #e7e7e7, stop: 1.0 #fafafa); 1630 1678 } … … 1663 1711 QTabWidget::pane { /* The tab widget frame */ 1664 1712 border-top: 2px solid #C2C7CB; 1665 position: absolute; 1666 top: -0.5em; 1667 } 1668 1669 QTabWidget::tab-bar { 1670 alignment: center; 1671 } 1672 1673 /* Style the tab using the tab sub-control. Note that 1713 position: absolute; 1714 top: -0.5em; 1715 } 1716 1717 QTabWidget::tab-bar { 1718 alignment: center; 1719 } 1720 1721 /* Style the tab using the tab sub-control. Note that 1674 1722 it reads QTabBar _not_ QTabWidget */ 1675 1723 QTabBar::tab { 1676 background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, 1677 stop: 0 #E1E1E1, stop: 0.4 #DDDDDD, 1724 background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, 1725 stop: 0 #E1E1E1, stop: 0.4 #DDDDDD, 1678 1726 stop: 0.5 #D8D8D8, stop: 1.0 #D3D3D3); 1679 1727 border: 2px solid #C4C4C3; … … 1686 1734 1687 1735 QTabBar::tab:selected, QTabBar::tab:hover { 1688 background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, 1689 stop: 0 #fafafa, stop: 0.4 #f4f4f4, 1736 background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, 1737 stop: 0 #fafafa, stop: 0.4 #f4f4f4, 1690 1738 stop: 0.5 #e7e7e7, stop: 1.0 #fafafa); 1691 1739 } … … 1910 1958 } 1911 1959 //! [158] 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970
Note:
See TracChangeset
for help on using the changeset viewer.