/* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */ /* Rosegarden A MIDI and audio sequencer and musical notation editor. Copyright 2000-2009 the Rosegarden development team. Other copyrights also apply to some parts of this work. Please see the AUTHORS file and individual file headers for details. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. See the file COPYING included with this distribution for more information. */ /* NOTE: using #setObjectNamedObject has higher specificity than * Rosegarden--OurClass, which is nearly worthless in most cases */ /* Start off with a global black background, because it has proven impossible to * address every last bit of background color without resorting to this. */ QWidget { background: #000000; color: #FFFFFF; /* undocumented, but it works, and it's necessary */ } QMainWindow::separator { width: 5px; /* when vertical */ height: 5px; /* when horizontal */ } QMainWindow::separator:hover { background-color: #CCDFFF; } QDockWidget { border: none; titlebar-close-icon: url(:pixmaps/style/title-close.png); titlebar-normal-icon: url(:pixmaps/style/title-undock.png); } QDockWidget::close-button, QDockWidget::float-button { border: 1px solid #AAAAAA; border-radius: 3px; background-color: qlineargradient(spread:pad, x1:0, y1:1, x2:0, y2:0, stop:0 #999999, stop:1 #DDDDDD); color: #000000; padding: 0px; icon-size: 16px; /* maximum icon size */ } /* QTabBar Individual tabs may be styled using the ::tab subcontrol. The tabs support the :only-one, :first, :last, :middle, :previous--selected, :next-selected, :selected pseudo states. The :top, :left, :right, :bottom pseudo states depending on the orientation of the tabs. Overlapping tabs for the selected state are created by using negative margins or using the absolute position scheme. The tear indicator of the QTabBar is styled using the ::tear subcontrol. QTabBar used two QToolButtons for its scrollers that can be styled using the QTabBar QToolButton selector. To specify the width of the scroll button use the ::scroller subcontrol. The alignment of the tabs within the QTabBar is styled using the alignment property. Warning: To change the position of the QTabBar within a QTabWidget, use the tab-bar subcontrol (and set subcontrol-position). */ /* Style this early so hopefully a lot of it will be overridden without even * more special code */ QTabBar::tear { image: url(tear_indicator.png); } QTabBar::scroller { /* the width of the scroll buttons */ width: 13px; } QTabBar QToolButton { /* the scroll buttons are tool buttons */ border-image: url(:pixmaps/style/tab-scroll-button.png) 1; border-width: 1px; } QTabBar QToolButton:hover { border-image: url(:pixmaps/style/tab-scroll-button-hover.png) 1; border-width: 1px; } QTabBar QToolButton:!enabled { border-image: url(:pixmaps/style/tab-scroll-button-disabled.png) 1; border-width: 1px; } QTabBar QToolButton::right-arrow { /* the arrow mark in the tool buttons */ image: url(:pixmaps/style/arrow-right-small.png); } QTabBar QToolButton::left-arrow { image: url(:pixmaps/style/arrow-left-small.png); } QTabWidget::pane { /* The tab widget frame */ color: #FFFFFF; border: 2px solid #BBBBBB; border-radius: 4px; padding: 2px; /* margin-top: 1ex;*/ } /* the background of the pane requires a QWidget hack to take the groupbox * background, because ::pane's background-color: doesn't work */ QTabWidget::pane QWidget { background: #404040; } QTabWidget::tab-bar { left: 5px; /* move to the right by 5px */ } /* Style the tab using the tab sub-control. Note that it reads QTabBar _not_ QTabWidget */ QTabBar::tab:top { border: 1px solid #AAAAAA; background-color: qlineargradient(spread:pad, x1:0, y1:1, x2:0, y2:0, stop:0 #999999, stop:1 #DDDDDD); color: #000000; border-bottom-color: #BBBBBB; /* same as the pane color */ border-top-left-radius: 4px; border-top-right-radius: 4px; min-width: 8ex; padding: 2px; } /* flipped version for upside down tab bars (MIDI mixer window, control * rulers) */ QTabBar::tab:bottom { border: 1px solid #AAAAAA; background-color: qlineargradient(spread:pad, x1:0, y1:1, x2:0, y2:0, stop:0 #999999, stop:1 #DDDDDD); color: #000000; border-top-color: #BBBBBB; /* same as the pane color */ border-bottom-left-radius: 4px; border-bottom-right-radius: 4px; min-width: 8ex; padding: 2px; } QTabBar::tab:hover { background-color: #CCDFFF; } QTabBar::tab:top:selected { border: 1px solid #E0E0E0; border-bottom-color: #BBBBBB; /*same as pane color */ background-color: qlineargradient(spread:pad, x1:0, y1:1, x2:0, y2:0, stop:0 #E0E0E0, stop:1 #EEEEEE); } QTabBar::tab:bottom:selected { border: 1px solid #E0E0E0; border-top-color: #BBBBBB; /*same as pane color */ background-color: qlineargradient(spread:pad, x1:0, y1:1, x2:0, y2:0, stop:0 #E0E0E0, stop:1 #EEEEEE); } QTabBar::tab:top:!selected { margin-top: 2px; /* make non-selected tabs look smaller*/ } QTabBar::tab:bottom:!selected { margin-bottom: 2px; /* make non-selected tabs look smaller*/ } QDialog, #View QDialog QWidget, #MinorDialog QWidget, #tempoview QWidget { background-color: #000000; } /* QToolBar Supports the box model. The :top, :left, :right, :bottom pseudo states depending on the area in which the tool bar is grouped. The :first, :last, :middle, :only-one pseudo states indicator the position of the tool bar within a line group (See QStyleOptionToolBar::positionWithinLine). The separator of a QToolBar is styled using the ::separator subcontrol. The handle (to move the toolbar) is styled using the ::handle subcontrol. */ /* Toolbars use gradient backgrounds that must be light enough to allow contrast * with black icons. Top/bottom and left/right require different gradients to * get the proper look. */ #tempoview QToolBar:top, #tempoview QToolBar:bottom, QToolBar:top, QToolBar:bottom { border-image: url(:pixmaps/style/toolbar-pixmap.png) 0; /* background-color: qlineargradient(spread:pad, x1:0, y1:1, x2:0, y2:0, stop:0 #999999, stop:1 #DDDDDD);*/ color: #000000; } QToolBar:left, QToolBar:right { background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:0, stop:0 #DDDDDD, stop:1 #999999); color: #000000; } /* Toolbars must be light enough for black icons, therefore black text on their * QLabels, rather than white, is more appropriate. */ QToolBar:top QLabel, QToolBar:bottom QLabel { background-color: transparent; color: #000000; } QToolBar::handle:top, QToolBar::handle:bottom { image: url(:/pixmaps/style/htoolbar-separator.png); } QToolBar::handle:left, QToolBar::handle:right { image: url(:pixmaps/style/vtoolbar-separator.png); } /* QLabel Supports the box model. Does not support the :hover pseudo-state. Since 4.3, setting a stylesheet on a QLabel automatically sets the QFrame::frameStyle property to QFrame::StyledPanel. */ /* QLabel is an awful lot of foreground text throughout the application, * including the contents of message boxes and various other texts one wouldn't * necessarily expect to be QLabel per se. */ QLabel, #View QLabel, #MinorDialog QLabel, #tempoview QLabel, #matrixview QLabel, #RosegardenParameterArea QLabel, #App QLabel { background: transparent; color: white; } /* QMenu Supports the box model. Individual items are styled using the ::item subcontrol. In addition to the usually supported pseudo states, item subcontrol supports the :selected, :default, :exclusive and the non-exclusive pseudo states. The indicator of checkable menu items is styled using the ::indicator subcontrol. The separator is styled using the ::separator subcontrol. For items with a sub menu, the arrow marks are styled using the right-arrow and left-arrow. The scroller is styled using the ::scroller. The tear-off is styled using the ::tear-off. */ QMenu, #MixerWindow QPushButton QMenu, #tempoview QMenu, #matrixview QMenu, #App QMenu, #View QMenu { /* background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:0, stop:0 #AAAAAA stop:1 #999999);*/ background-color: #EEEEEE; border: 1px solid black; } QMenu::separator { height: 2px; background: #AAAAAA; margin-left: 10px; margin-right: 5px; } QMenu::item:enabled, #MixerWindow QPushButton QMenu::item:enabled, #tempoview QMenu::item:enabled, #matrixview QMenu::item:enabled, #App QMenu::item:enabled, #View QMenu::item:enabled { /* 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; color: #000000; padding: 2px 25px 2px 20px; border: 1px solid transparent; min-width: 12em; /* leaves room for space between item and hotkey */ } QMenu::item:!enabled, #MixerWindow QPushButton QMenu::item:!enabled, #tempoview QMenu::item:!enabled, #matrixview QMenu::item:!enabled, #App QMenu::item:!enabled, #View QMenu::item:!enabled { color: #AAAAAA; padding: 2px 25px 2px 20px; border: 1px solid transparent; min-width: 12em; /* leaves room for space between item and hotkey */ } /* Menu selection background color */ QMenu::item:selected, #tempoview QMenu::item:selected, #matrixview QMenu::item:selected, #App QMenu::item:selected, #View QMenu::item:selected { background-color: #80AFFF; color: #FFFFFF; } /* non-exclusive indicator = check box style indicator (see QActionGroup::setExclusive) */ QMenu::indicator:non-exclusive:unchecked { image: url(:pixmaps/style/checkbox_unchecked.png); } QMenu::indicator:non-exclusive:unchecked:selected { image: url(:pixmaps/style/checkbox_unchecked_hover.png); } QMenu::indicator:non-exclusive:checked { image: url(:pixmaps/style/checkbox_checked.png); } QMenu::indicator:non-exclusive:checked:selected { image: url(:pixmaps/style/checkbox_checked_hover.png); } /* exclusive indicator = radio button style indicator (see QActionGroup::setExclusive) */ QMenu::indicator:exclusive:unchecked { image: url(:pixmaps/style/radiobutton_unchecked.png); } QMenu::indicator:exclusive:unchecked:selected { image: url(:pixmaps/style/radiobutton_unchecked_hover.png); } QMenu::indicator:exclusive:checked { image: url(:pixmaps/style/radiobutton_checked.png); } QMenu::indicator:exclusive:checked:selected { image: url(:pixmaps/style/radiobutton_checked_hover.png); } /* #View QLabel { background-color: transparent; color: #FFFFFF; }*/ #TRACK_BUTTONS QWidget { background-color: #DDDDDD; color: #000000; } /*#TrackButtonFrame QFrame { color: red; }*/ /*QInputDialog QLabel, #View QInputDialog QLabel { background-color: transparent; color #FFFFFF; }*/ /* QAbstractScrollArea. Supports the box model. All derivatives of QAbstractScrollArea, including QTextEdit, and QAbstractItemView (all item view classes), support scrollable backgrounds using background-attachment. Setting the background-attachment to fixed provides a background-image that does not scroll with the viewport. Setting the background-attachment to scroll, scrolls the background-image when the scroll bars move. See Customizing QAbstractScrollArea for an example. */ QAbstractScrollArea { } /* QCheckBox Supports the box model. The check indicator can be styled using the ::indicator subcontrol. By default, the indicator is placed in the Top Left corner of the Contents rectangle of the widget. The spacing property specifies the spacing between the check indicator and the text. */ QCheckBox:enabled QLabel, QCheckBox:enabled { color: #FFFFFF } QCheckbox:!enabled QLabel, QCheckBox:!enabled { color: #000000; } QCheckBox::indicator:enabled { background: url(:pixmaps/style/checkbox-checked.png); } QCheckBox { spacing: 5px; } QCheckBox::indicator { width: 13px; height: 13px; } QCheckBox::indicator:unchecked { image: url(:pixmaps/style/checkbox_unchecked.png); } QCheckBox::indicator:!enabled { image: url(:pixmaps/style/checkbox_disabled.png); } QCheckBox::indicator:checked:!enabled { image: url(:pixmaps/style/checkbox_checked_disabled.png); } QCheckBox::indicator:unchecked:hover { image: url(:pixmaps/style/checkbox_unchecked_hover.png); } QCheckBox::indicator:unchecked:pressed { image: url(:pixmaps/style/checkbox_unchecked_pressed.png); } QCheckBox::indicator:checked { image: url(:pixmaps/style/checkbox_checked.png); } QCheckBox::indicator:checked:hover { image: url(:pixmaps/style/checkbox_checked_hover.png); } QCheckBox::indicator:checked:pressed { image: url(:pixmaps/style/checkbox_checked_pressed.png); } QCheckBox::indicator:indeterminate { image: url(:pixmaps/style/checkbox_indeterminate.png); } QCheckBox::indicator:indeterminate:hover { image: url(:pixmaps/style/checkbox_indeterminate_hover.png); } QCheckBox::indicator:indeterminate:pressed { image: url(:pixmaps/style/checkbox_indeterminate_pressed.png); } /* QRadioButton Supports the box model. The check indicator can be styled using the ::indicator subcontrol. By default, the indicator is placed in the Top Left corner of the Contents rectangle of the widget. The spacing property specifies the spacing between the check indicator and the text. */ QRadioButton:enabled QLabel, QRadioButton:enabled { color: #FFFFFF; } QRadioButton:!enabled QLabel, QRadioButton:!enabled { color: #000000; } QRadioButton::indicator { width: 13px; height: 13px; } QRadioButton::indicator::unchecked:enabled { image: url(:pixmaps/style/radiobutton_unchecked.png); } QRadioButton::indicator::unchecked:!enabled { image: url(:pixmaps/style/radiobutton_unchecked_disabled.png); } QRadioButton::indicator:unchecked:hover:enabled { image: url(:pixmaps/style/radiobutton_unchecked_hover.png); } QRadioButton::indicator:unchecked:hover:!enabled { image: url(:pixmaps/style/radiobutton_unchecked_hover_disabled.png); } QRadioButton::indicator:unchecked:pressed:enabled { image: url(:pixmaps/style/radiobutton_unchecked_pressed.png); } QRadioButton::indicator:unchecked:pressed:!enabled { image: url(:pixmaps/style/radiobutton_unchecked_pressed_disabled.png); } QRadioButton::indicator::checked:enabled { image: url(:pixmaps/style/radiobutton_checked.png); } QRadioButton::indicator::checked:!enabled { image: url(:pixmaps/style/radiobutton_checked_disabled.png); } QRadioButton::indicator:checked:hover:enabled { image: url(:pixmaps/style/radiobutton_checked_hover.png); } QRadioButton::indicator:checked:hover:!enabled { image: url(:pixmaps/style/radiobutton_checked_hover_disabled.png); } QRadioButton::indicator:checked:pressed:enabled { image: url(:pixmaps/style/radiobutton_checked_pressed.png); } QRadioButton::indicator:checked:pressed:!enabled { image: url(:pixmaps/style/radiobutton_checked_pressed_disabled.png); } /* QColumnView The grip can be styled be using the image property. The arrow indicators can by styled using the ::left-arrow subcontrol and the ::right-arrow subcontrol. */ QColumnView { } /* QDialog Supports only the background, background-clip and background-origin properties. If you subclass from QDialog, you need to provide a paintEvent for your custom QDialog as below: void CustomDialog::paintEvent(QPaintEvent *) { QStyleOption opt; opt.init(this); QPainter p(this); style()->drawPrimitive(QStyle::PE_Widget, &opt, &p, this); } The above code is a no-operation if there is no stylesheet set. Warning: Make sure you define the Q_OBJECT macro for your custom widget. */ QDialog { /*background: green; */ } /* QDialogButtonBox The layout of buttons can be altered using the button-layout property. */ QDialogButtonBox { background-color: yellow; color: red; } /* QFrame Supports the box model. Since 4.3, setting a stylesheet on a QLabel automatically sets the QFrame::frameStyle property to QFrame::StyledPanel. */ QFrame { /* We probably want these to remain invisible, and not style them. If there * are exceptions, they'll have to be addressed on a case by case basis, * because styling QFrame in general is definitely a BAD idea */ } /* QHeaderView Supports the box model. The sections of the header view are styled using the ::section sub control. The section Sub-control supports the :middle, :first, :last, :only-one, :next-selected, :previous-selected, :selected pseudo states. Sort indicator in can be styled using the ::up-arrow and the ::down-arrow Sub-control. */ /* This is the headers for various list views and tables. The "sort indicators" * appear on the segment summary for one thing, allowing you to sort the table * by the column you click on. */ QHeaderView::section { border: 1px solid #AAAAAA; background-color: qlineargradient(spread:pad, x1:0, y1:1, x2:0, y2:0, stop:0 #707070, stop:1 #808080); color: #FFFFFF; padding-left: 4px; padding-right: 1em; } /* style the sort indicator */ QHeaderView::down-arrow { image: url(:pixmaps/style/arrow-down-small-inverted.png); } QHeaderView::up-arrow { image: url(:pixmaps/style/arrow-up-small-inverted.png); } /* QListView (affects QListWidget) Supports the box model. When alternating row colors is enabled, the alternating colors can be styled using the alternate-background-color property. The color and background of the selected item is styled using selection-color and selection-background-color respectively. The selection behavior is controlled by the #show-decoration-selected-prop property. See QAbsractScrollArea to style scrollable backgrounds. */ /* file dialogs */ QListView, #tempoview QListView, #App QListView { background-color: #FFFFFF; alternate-background-color: #EEEEFF; color: #000000; selection-background-color: #80AFFF; selection-color: #FFFFFF; } /* QMenuBar Supports the box model. The spacing property specifies the spacing between menu items. Individual items are styled using the ::item subcontrol. */ QMenuBar, #tempoview QMenuBar, #App QMenuBar { background-color: #404040; } QMenuBar::item, #tempoview QMenuBar::item, #App QMenuBar::item { spacing: 3px; /* spacing between menu bar items */ padding: 1px 4px; background: transparent; color: #FFFFFF; } /* Selected item background */ QMenuBar::item:selected, #tempoview QMenuBar::item:selected, #App QMenuBar::item:selected { background-color: #80AFFF; color: #FFFFFF; } QMenuBar::item:pressed, #tempoview QMenuBar::item:pressed, #App QMenuBar::item:pressed { /* background: #EEEEEE;*/ background-color: #BBCEFF; } /* QMessageBox The messagebox-text-interaction-flags property can be used to alter the interaction with text in the message box. */ QMessageBox { background: #000000; } /* QProgressBar Supports the box model. The chunks of the progress bar can be styled using the ::chunk subcontrol. The chunk is displayed on the Contents rectangle of the widget. If the progress bar displays text, use the text-align property to position the text. Indeterminate progress bars have the :indeterminate pseudo state set. */ QProgressBar { border: 1px solid #AAAAAA; border-radius: 3px; text-align: center; background: #FFFFFF; } QProgressBar::chunk { background-color: #89B8E7; width: 20px; } /* QScrollBar Supports the box model. The Contents rectangle of the widget is considered to be the groove over which the slider moves. The extent of the QScrollBar (i.e the width or the height depending on the orientation) is set using the width or height property respectively. To determine the orientation, use the :horizontal and the :vertical pseudo states. The slider can be styled using the ::handle subcontrol. Setting the min-width or min-height provides size contraints for the slider depending on the orientation. The ::add-line subcontrol can be used to style the button to add a line. By default, the add-line subcontrol is placed in top right corner of the Border rectangle of the widget. Depending on the orientation the ::right-arrow or ::down-arrow. By default, the arrows are placed in the center of the Contents rectangle of the add-line subcontrol. The ::sub-line subcontrol can be used to style the button to subtract a line. By default, the sub-line subcontrol is placed in bottom right corner of the Border rectangle of the widget. Depending on the orientation the ::left-arrow or ::up-arrow. By default, the arrows are placed in the center of the Contents rectangle of the sub-line subcontrol. The ::sub-page subcontrol can be used to style the region of the slider that subtracts a page. The ::add-page subcontrol can be used to style the region of the slider that adds a page. */ /* HORIZONTAL */ QTabWidget QScrollBar:left-arrow:horizontal, QScrollBar:left-arrow:horizontal { image: url(:pixmaps/style/arrow-left.png); width: 8px; height 8px; } QScrollBar::right-arrow:horizontal { image: url(:pixmaps/style/arrow-right.png); width: 8px; height 8px; } QScrollBar::add-page:horizontal, QScrollBar::sub-page:horizontal { background: #404040; } QScrollBar::add-line:horizontal { border: 2px solid #404040; background: #808080; width: 10px; subcontrol-position: right; subcontrol-origin: margin; } QScrollBar::sub-line:horizontal { border: 2px solid #404040; background: #808080; width: 10px; subcontrol-position: left; subcontrol-origin: margin; } QScrollBar:horizontal { border: 2px solid #404040; background-color: none; height: 16px; margin: 0px 10px 0 10px; } QScrollBar::handle:horizontal { background-color: qlineargradient(spread:pad, x1:0, y1:1, x2:0, y2:0, stop:0 #999999, stop:1 #DDDDDD); min-width: 10px; } /* VERTICAL */ QScrollBar:up-arrow:vertical { image: url(:pixmaps/style/arrow-up.png); width: 8px; height 8px; } QScrollBar::down-arrow:vertical { image: url(:pixmaps/style/arrow-down.png); width: 8px; height 8px; } QTabWidget QScrollBar::add-page:vertical, QTabWidget QScrollBar::sub-page:vertical, QScrollBar::add-page:vertical, QScrollBar::sub-page:vertical { background: #404040; } QScrollBar::add-line:vertical { border: 2px solid #404040; background: #808080; height: 10px; subcontrol-position: bottom; subcontrol-origin: margin; } QScrollBar::sub-line:vertical { border: 2px solid #404040; background: #808080; height: 10px; subcontrol-position: top; subcontrol-origin: margin; } QScrollBar:vertical { border: 2px solid #404040; background-color: none; width: 16px; margin: 10px 0 10px 0; } QComboBox QAbstractItemView QScrollBar:vertical { width: 12px; } QScrollBar::handle:vertical { background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:0, stop:0 #DDDDDD, stop:1 #999999); min-height: 10px; } /* QSizeGrip Supports the width, height, and image properties. */ QSizeGrip { } /* QSlider Supports the box model. For horizontal slides, the min-width and height properties must be provided. For vertical sliders, the min-height and width properties must be provided. The groove of the slider is styled using the ::groove. The groove is positioned by default in the Contents rectangle of the widget. The thumb of the slider is styled using ::handle subcontrol. The subcontrol moves in the Contents rectangle of the groove subcontrol. */ QSlider::horizontal { border: 0px solid transparent; background: transparent; min-width: 50px; min-height: 5px; } QSlider::handle:horizontal { background: qlineargradient(x1:0, y1:0, x2:1, y2:1, stop:0 #b4b4b4, stop:1 #8f8f8f); border: 1px solid #5c5c5c; width: 8px; height 8px; margin: -5px 0; border-radius: 3px; } QSlider::groove:horizontal { background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 #E0E0E0, stop:1 #EEEEEE); height: 5px; position: absolute; left: 4px; right: 4px; } /* QSplitter Supports the box model. The handle of the splitter is styled using the ::handle subcontrol. */ /* these are the little vertical grab bars in file dialogs */ QSplitter { background: #000000; } QSplitter:hover { background-color: #CCDFFF; } /* QStatusBar Supports only the background property. The frame for individual items can be style using the ::item subcontrol. */ /* Styling of QStatusBar doesn't seem to be very fine grained, and after some * experiments here, I think we may be better off leaving this one well enough * alone */ /*QStatusBar { background: #404040; } QStatusBar::item { border: 1px solid #BBBBBB; }*/ /* QTableView (affects QTableWidget) Supports the box model. When alternating row colors is enabled, the alternating colors can be styled using the alternate-background-color property. The color and background of the selected item is styled using selection-color and selection-background-color respectively. The corner widget in a QTableView is implemented as a QAbstractButton and can be styled using the "QTableView QTableCornerButton::section" selector. The color of the grid can be specified using the gridline-color property. See QAbsractScrollArea to style scrollable backgrounds. */ QTableView, #StyledTable { background: #FFFFFF; alternate-background-color: #EEEEFF; color: #000000; gridline-color: #202020; selection-background-color: #80AFFF; selection-color: #FFFFFF; } /* I don't think we actually want/need to style this corner button #StyledTable QTableCornerButton::section { background: green; }*/ /* QTextEdit Supports the box model. The color and background of selected text is styled using selection-color and selection-background-color respectively. See QAbsractScrollArea to style scrollable backgrounds. QTimeEdit See QSpinBox. */ QTextEdit { background: #FFFFFF; color: #000000; } QWidget#LED { background-color: transparent; } #Fader { background-color: #404040; } /*QWidget##matrixview { background-color: #000000; }*/ /* the audio and MIDI mixer windows */ /* (actually only affects audio, because the MIDI mixer window is more * complicated) */ QWidget#MIXER_WINDOW { background-color: #000000; } /* internal fader widgets need a style-set transparent background at a minimum * */ QWidget#FADER { /* or maybe not... this is actually too simplistic to work, and needs * further investigation */ background-color: transparent; } /* QGroupBox Supports the box model. The title can be styled using the ::title subcontrol. By default, the title is placed depending on QGroupBox::textAlignment. In the case of a checkable QGroupBox, the title includes the check indicator. The indicator is styled using the the ::indicator subcontrol. The spacing property can be used to control the spacing between the text and indicator. */ QGroupBox, #View QGroupBox, #App QGroupBox, #App QWidget QGroupBox, #RosegardenParameterArea QGroupBox { background: #404040; color: #FFFFFF; border: 2px solid #BBBBBB; border-radius: 4px; padding: 2px; margin-top: 1ex; } QGroupBox::title, #View QGroupBox::title, #App QGroupBox:title, #App QWidget QGroupBox:title, #RosegardenParameterArea QGroupBox::title { color: #FFFFFF; subcontrol-origin: margin; subcontrol-position: top center; padding: 0 5px; } QGroupBox::title:!enabled, #View QGroupBox::title:!enabled, #App QGroupBox:title:!enabled, #App QWidget QGroupBox:title:!enabled, #RosegardenParameterArea QGroupBox::title:!enabled { color: #000000; } QGroupBox QWidget, #MinorDialog QGroupBox QWidget, #tempoview QGroupBox QWidget, #App QGroupBox QWidget { background: #404040; } /* QToolButton Supports the box model. If the QToolButton has a menu, is ::menu-indicator subcontrol can be used to style the indicator. By default, the menu-indicator is positioned at the bottom right of the Padding rectangle of the widget. If the QToolButton is in QToolButton::MenuButtonPopup mode, the ::menu-button subcontrol is used to draw the menu button. ::menu-arrow subcontrol is used to draw the menu arrow inside the menu-button. By default, it is positioned in the center of the Contents rectangle of the the menu-button subcontrol. When the QToolButton displays arrows, the ::up-arrow, ::down-arrow, ::left-arrow and ::right-arrow subcontrols are used. Warning: If you only set a background-color on a QToolButton, the background will not appear unless you set the border property to some value. This is because, by default, the QToolButton draws a native border which completely overlaps the background-color. For example, QToolButton { background-color: red; border: none; } */ /* We use tool buttons for the TPB collapsing frame texts, eg. "Playback * parameters" and for toolbar buttons */ QToolButton[popupMode="1"] { /* only for MenuButtonPopup */ padding-right: 5px; /* make way for the popup button */ } QToolButton::menu-arrow { image: url(:pixmaps/style/arrow-down-small.png); } QToolButton::menu-arrow:open { top: 1px; left: 1px; /* shift it a bit */ } QToolButton::menu-button { background: transparent; border: none; } /*QToolButton::menu-button { border-image: url(:pixmaps/style/tab-scroll-button.png) 1; border-width: 1px; } QToolButton::menu-button:hover { border-image: url(:pixmaps/style/tab-scroll-button-hover.png) 1; border-width: 1px; } QToolButton::menu-button:!enabled { border-image: url(:pixmaps/style/tab-scroll-button-disabled.png) 1; border-width: 1px; }*/ QToolButton::up-arrow { image: url(:pixmaps/style/arrow-up-small.png); } QToolButton::down-arrow { subcontrol-position: right bottom; image: url(:pixmaps/style/arrow-down-small.png); } QToolButton, QToolButton::enabled, #tempoview QToolButton, #tempoview QToolButton::enabled, #View QToolButton, #View QToolButton::enabled, #App QToolButton, #App QToolButton::enabled, #RosegardenParameterArea QToolButton, #RosegardenParameterArea QToolButton::enabled { color: #FFFFFF; background-color: transparent; border: 1px solid transparent; border-radius: 2px; } QToolButton::pressed, QToolButton::checked, #tempoview QToolButton::pressed, #tempoview QToolButton::checked, #View QToolButton::pressed, #View QToolButton::checked, #App QToolButton::pressed, #App QToolButton::checked, #RosegardenParameterArea QToolButton::pressed, #RosegardenParameterArea QToolButton::checked { border: 1px solid #AAAAAA; border-radius: 2px; background-color: qlineargradient(spread:pad, x1:0, y1:1, x2:0, y2:0, stop:0 #E0E0E0, stop:1 #EEEEEE); } QToolButton::enabled:hover, #View QToolButton::enabled:hover, #App QToolButton::enabled:hover, #RosegardenParameterArea QToolButton::enabled:hover { border: 1px solid #AAAAAA; border-radius: 2px; background-color: #CCDFFF; } QToolButton::!enabled, #tempoview QToolButton::!enabled, #View QToolButton::!enabled, #App QToolButton::!enabled, #RosegardenParameterArea QToolButton::!enabled { color: #FFFFFF; background-color: transparent; } QToolButton::menu-indicator { /* the arrow on tool buttons with menus in ImmediatePopup mode is * intentionally styled out of existence */ background: transparent; } /* QPushButton Supports the box model. Supports the :default, :flat, :checked pseudo states. For QPushButton with a menu, the menu indicator is styled using the ::menu-indicator subcontrol. Appearance of checkable push buttons can be customized using the :open and :closed pseudo-states. */ QPushButton::enabled, #matrixview QPushButton::enabled, #MinorDialog QPushButton::enabled, #tempoview QPushButton::enabled, QWidget#tempoview QPushButton::enabled, #View QPushButton::enabled, #View QDialog QPushButton::enabled, #App QPushButton::enabled, QInputDialog QPushButton::enabled, QGroupBox QPushButton::enabled, #App QGroupBox QPushButton::enabled, #App QWidget QPushButton::enabled, #RosegardenParameterArea QPushButton::enabled { border: 1px solid #AAAAAA; border-radius: 3px; background-color: qlineargradient(spread:pad, x1:0, y1:1, x2:0, y2:0, stop:0 #999999, stop:1 #DDDDDD); color: #000000; /* min-width: 60px;*/ padding: 0 5px 0 5px; } QPushButton::!enabled, #matrixview QPushButton::!enabled, #MinorDialog QPushButton::!enabled, #tempoview QPushButton::!enabled, QWidget#tempoview QPushButton::!enabled, #View QPushButton::!enabled, #View QDialog QPushButton::!enabled, #App QPushButton::!enabled, QInputDialog QPushButton::!enabled, QGroupBox QPushButton::!enabled, #App QGroupBox QPushButton::!enabled, #App QWidget QPushButton::!enabled, #RosegardenParameterArea QPushButton::!enabled { border: 1px solid #808080; border-radius: 3px; /* background-color: qlineargradient(spread:pad, x1:0, y1:1, x2:0, y2:0, stop:0 #808080, stop:1 #999999); */ /* use the same background for disabled buttons, as Qt does the sunken * effect on these, and that looks fine. */ background-color: qlineargradient(spread:pad, x1:0, y1:1, x2:0, y2:0, stop:0 #999999, stop:1 #DDDDDD); color: #000000; /* min-width: 60px;*/ padding: 0 5px 0 5px; } QPushButton:hover, #matrixview QPushButton:hover, #MinorDialog QPushButton:hover, #tempoview QPushButton:hover, #View QPushButton:hover, #App QPushButton:hover, #App QWidget QPushButton:hover, QInputDialog QPushButton:hover, QGroupBox QPushButton:hover, #App QGroupBox QPushButton:hover, #RosegardenParameterArea QPushButton:hover { border: 1px solid #AAAAAA; border-radius: 3px; /* background-color: qlineargradient(spread:pad, x1:0, y1:1, x2:0, y2:0, stop:0 #999FAF, stop:1 #CCDFFF);*/ background-color: #CCDFFF; color: #000000; /* min-width: 60px;*/ } QPushButton::checked, QPushButton::pressed, /*#MinorDialog QPushButton::checked, #MinorDialog QPushButton::pressed,*/ #tempoview QPushButton::checked, #tempoview QPushButton::pressed, #App QPushButton::checked, #App QPushButton::pressed, #App QWidget QPushButton::checked, #App QWidget QPushButton::pressed, QInputDialog QPushButton::checked, QInputDialog QPushButton:pressed, #View QPushButton::checked, #View QPushButton::pressed, #RosegardenParameterArea QPushButton::checked, #RosegardenParameterArea QPushButton::pressed { border: 1px solid #E0E0E0; border-radius: 3px; background-color: qlineargradient(spread:pad, x1:0, y1:1, x2:0, y2:0, stop:0 #E0E0E0, stop:1 #EEEEEE); } /* QComboBox The frame around the combobox can be styled using the box model. The drop-down button can be styled using the ::drop-down subcontrol. By default, the drop-down button is placed in the top right corner of the padding rectangle of the widget. The arrow mark inside the drop-down button can be styled using the ::down-arrow subcontrol. By default, the arrow is placed in the center of the contents rectangle of the drop-down subcontrol. */ QComboBox::enabled, QComboBox, #View QComboBox::enabled, #View QComboBox, #App QComboBox::enabled, #App QComboBox, #App QWidget QComboBox::enabled, #App QWidget QComboBox, QInputDialog QComboBox::enabled, QInputDialog QComboBox, #RosegardenParameterArea QComboBox::enabled, #RosegardenParameterArea QComboBox { border: 1px solid #AAAAAA; border-radius: 3px; padding: 0 5px 0 5px; /* min-width: 6em;*/ min-width: 2em; color: #000000; } QComboBox::!enabled, #View QComboBox::!enabled, #App QComboBox::!enabled, #App QWidget QComboBox::!enabled, QInputDialog QComboBox::!enabled, #RosegardenParameterArea QComboBox::!enabled { color: #AAAAAA; border: 1px solid #808080; border-radius: 3px; } QComboBox::enabled:hover, QComboBox:hover, QComboBox::drop-down:hover, #App QWidget QComboBox::enabled:hover, #App QWidget QComboBox:hover, #App QWidget QComboBox::drop-down:hover, QInputDialog QComboBox::enabled:hover, QInputDialog QComboBox:hover, QInputDialog QComboBox::drop-down:hover, #RosegardenParameterArea QComboBox::enabled:hover, #RosegardenParameterArea QComboBox:hover { /* background-color: qlineargradient(spread:pad, x1:0, y1:1, x2:0, y2:0, stop:0 #999FAF, stop:1 #CCDFFF);*/ background-color: #CCDFFF; } QComboBox::editable, #View QComboBox::editable, #App QComboBox::editable, #App QWidget QComboBox::editable, QInputDialog QComboBox::editable, #RosegardenParameterArea QComboBox:editable { background-color: #FFFFFF; } QComboBox::!editable, QComboBox::drop-down:!editable, #App QWidget QComboBox::!editable, #App QWidget QComboBox::drop-down:!editable, QInputDialog QComboBox::drop-down:!editable, #RosegardenParameterArea QComboBox:!editable, #RosegardenParameterArea QComboBox::drop-down:!editable { background-color: qlineargradient(spread:pad, x1:0, y1:1, x2:0, y2:0, stop:0 #999999, stop:1 #DDDDDD); } /* QComboBox gets the "on" state when the popup is open */ QComboBox::!editable:on, QComboBox::drop-down:editable:on, #App QWidget QComboBox::!editable:on, #App QWidget QComboBox::drop-down:editable:on, QInputDialog QComboBox::drop-down:editable:on, #RosegardenParameterArea QComboBox:!editable:on, #RosegardenParameterArea QComboBox::drop-down:editable:on { background-color: qlineargradient(spread:pad, x1:0, y1:1, x2:0, y2:0, stop:0 #E0E0E0, stop:1 #EEEEEE); } QComboBox::on, #App QWidget QComboBox::on, QInputDialog QComboBox::on, #RosegardenParameterArea QComboBox:on { /* shift the text when the popup opens */ padding-top: 3px; padding-left: 4px; } QComboBox::drop-down, #App QWidget QComboBox::drop-down, QInputDialog QComboBox::drop-down, QFileDialog QComboBox::drop-down, #RosegardenParameterArea QComboBox::drop-down { subcontrol-origin: padding; subcontrol-position: top right; width: 15px; } QComboBox::down-arrow, #App QWidget QComboBox::down-arrow, QInputDialog QComboBox::down-arrow, #RosegardenParameterArea QComboBox::down-arrow { image: url(:pixmaps/style/arrow-down-small.png); width: 8px; height 8px; } QComboBox::down-arrow:on, #App QWidget QComboBox::down-arrow:on, QInputDialog QComboBox::down-arrow:on, #RosegardenParameterArea QComboBox::down-arrow:on { top: 1px; left: 1px; } /* The pop-up of the QComboBox is a QAbstractItemView and is styled using the descendant selector: */ QComboBox QAbstractItemView, #App QWidget QComboBox QAbstractItemView, QInputDialog QComboBox QAbstractItemView, QFileDialog QComboBox QAbstractItemView, #RosegardenParameterArea QComboBox QAbstractItemView { border-image: url(:pixmaps/style/combo-dropdown.png) 4; selection-background-color: #80AFFF; selection-color: #FFFFFF; color: #000000; } QWidget#SQUEEZED, #RosegardenParameterArea QWidget#SQUEEZED { background-color: transparent; color: #FFFFFF; } QWidget#SPECIAL_LABEL, #RosegardenParameterArea QWidget#SPECIAL_LABEL { color: #000000; background-color: #999999; border: 0 solid transparent; /* no sunken border on these */ } /* Give the non-LED parts of the dialog the groupbox "lighter black" background * for improved constrast, and set foreground color to "LED blue" as used * elsewhere */ #RosegardenTransport QWidget { background-color: #404040; color: #C0D8FF; border: 0 solid transparent; /* no sunken border on these */ } #RosegardenTransport QFrame QWidget { background-color: #000000; } /* Transport buttons are styled independently, with a smaller radius and a * lighter "pressed" state */ #RosegardenTransport QPushButton::enabled, #RosegardenTransport QFrame QWidget QPushbutton { border: 1px solid #AAAAAA; border-radius: 2px; background-color: qlineargradient(spread:pad, x1:0, y1:1, x2:0, y2:0, stop:0 #999999, stop:1 #DDDDDD); min-width: 0; } #RosegardenTransport QFrame QWidget QPushbutton:hover, #RosegardenTransport QPushButton:hover { border: 1px solid #AAAAAA; border-radius: 2px; background-color: #CCDFFF; color: #000000; min-width: 0; } #RosegardenTransport QFrame QWidget QPushbutton:checked, #RosegardenTransport QFrame QWidget QPushbutton:pressed, #RosegardenTransport QPushButton::checked, #RosegardenTransport QPushButton::pressed { border: 1px solid #E0E0E0; border-radius: 1px; background-color: qlineargradient(spread:pad, x1:0, y1:1, x2:0, y2:0, stop:0 #E0E0E0, stop:1 #EEEEEE); } #MatrixParameters QWidget { background-color: #000000; color: #FFFFFF; } #MatrixParameters QLabel { background: transparent; color: white; } #MatrixParameters QGroupBox { background: #404040; color: #FFFFFF; border: 2px solid #BBBBBB; border-radius: 4px; padding: 2px; margin-top: 1ex; } #MatrixParameters QGroupBox::title { color: #FFFFFF; subcontrol-origin: margin; subcontrol-position: top center; padding: 0 5px; } #MatrixParameters QGroupBox QWidget { background: #404040; } /* QToolTip Supports the box model. The opacity property controls the opacity of the tooltip. */ /* I learned a trick from the stylesheet demo for spinboxes. At deep layers of * QWidget hacks, the backgrounds are the hard bit to style. You wind up with * buttons that have a bad normal state, but still hover properly, for example. * The stock pixmaps from the stylesheet demo magically addressed this bitchy * problem with deep spinboxes by styling their backgrounds with PIXMAPS. Well * there you go. Lesson learned. So now tooltips have a pixmap full of solid * color that won't have any scaling or tiling problems, and because they use a * pixmap instead of some nebulous background property, ka-wham, all the * tooltips everywhere now behave properly, through the magic of a really big * sledge hammer. I'm quite happy to have hit upon this trick. This would have * been almost impossible to fix any other way. W00T!!! :) */ QToolTip, QWidget QToolTip, #App QToolTip, QMainWindow QToolTip, #RosegardenTransport QPushButton QToolTip, #RosegardenParameterArea QPushButton QToolTip, #View QWidget QToolTip, #App QWidget QToolTip { background-color: #fffbd4; border-image: url(:pixmaps/style/tooltip.png); color: #000000; } /* QLineEdit Supports the box model. The color and background of the selected item is styled using selection-color and selection-background-color respectively. The password character can be styled using the lineedit-password-character property. */ QLineEdit, /* thanks be to Gaia this override actually works, for once!, and I dodged a * very nasty bullet here: */ QFileDialog QLineEdit { border: 1px solid #AAAAAA; background-color: #FFFFFF; selection-background-color: #80AFFF; color: #000000; selection-color: #FFFFFF; } /* make frames visible for sorting out layout problems */ /*QFrame { border: 1px solid red; }*/ #PluginControl QWidget { margin-bottom: -25px; margin-top: -25px; } #MinorDialog { background-color: #000000; } /* QSpinBox The frame of the spin box can be styled using the box model. The up button and arrow can be styled using the ::up-button and ::up-arrow subcontrols. By default, the up-button is placed in the top right corner in the Padding rectangle of the widget. Without an explicit size, it occupies half the height of its reference rectangle. The up-arrow is placed in the center of the Contents rectangle of the up-button. The down button and arrow can be styled using the ::down-button and ::down-arrow subcontrols. By default, the down-button is placed in the bottom right corner in the Padding rectangle of the widget. Without an explicit size, it occupies half the height of its reference rectangle. The bottom-arrow is placed in the center of the Contents rectangle of the bottom-button. */ QSpinBox, QDoubleSpinBox { padding-right: 15px; /* make room for the arrows */ /* we will use the stock demo frame image after all, since it was suitable, * and actually fixes background problems that would otherwise be annoying * to solve*/ border-image: url(:pixmaps/style/frame.png) 4; border-width: 3; color: #000000; selection-color: #FFFFFF; selection-background-color: #80AFFF; } QSpinBox::up-button, QDoubleSpinBox::up-button { subcontrol-origin: border; subcontrol-position: top right; /* position at the top right corner */ width: 16px; /* 16 + 2*1px border-width = 15px padding + 3px parent border */ border-image: url(:pixmaps/style/spinup.png) 1; border-width: 1px; } QSpinBox::up-button:hover, QDoubleSpinBox::up-button:hover { border-image: url(:pixmaps/style/spinup_hover.png) 1; } QSpinBox::up-button:pressed, QDoubleSpinBox::up-button:pressed { border-image: url(:pixmaps/style/spinup_pressed.png) 1; } QSpinBox::up-arrow, QDoubleSpinBox::up-arrow { image: url(:pixmaps/style/arrow-up-small.png); width: 7px; height: 7px; } QSpinBox::up-arrow:disabled, QSpinBox::up-arrow:off, QDoubleSpinBox::up-arrow:disabled, QDoubleSpinBox::up-arrow:off { /* off state when value is max */ image: url(:pixmaps/style/arrow-up-small-inverted.png); } QSpinBox::down-button, QDoubleSpinBox::down-button { subcontrol-origin: border; subcontrol-position: bottom right; /* position at bottom right corner */ width: 16px; border-image: url(:pixmaps/style/spindown.png) 1; border-width: 1px; border-top-width: 0; } QSpinBox::down-button:hover, QDoubleSpinBox::down-button:hover { border-image: url(:pixmaps/style/spindown_hover.png) 1; } QSpinBox::down-button:pressed, QDoubleSpinBox::down-button:pressed { border-image: url(:pixmaps/style/spindown_pressed.png) 1; } QSpinBox::down-arrow, QDoubleSpinBox::down-arrow { image: url(:pixmaps/style/arrow-down-small.png); width: 7px; height: 7px; } QSpinBox::down-arrow:disabled, QSpinBox::down-arrow:off, QDoubleSpinBox::down-arrow:disabled, QDoubleSpinBox::down-arrow:off { /* off state when value in min */ image: url(:pixmaps/style/arrow-down-small-inverted.png); } /* QTreeView (affects QTreeWidget) Supports the box model. When alternating row colors is enabled, the alternating colors can be styled using the alternate-background-color property. The color and background of the selected item is styled using selection-color and selection-background-color respectively. The branches of the tree view can be styled using the ::branch subcontrol. The ::branch Sub-control supports the :open, :closed, :has-sibling and :has-children pseudo states. See QAbsractScrollArea to style scrollable backgrounds. */ #tempoview QTreeView, QTreeView { background-color: #FFFFFF; alternate-background-color: #EEEEFF; color: #000000; selection-background-color: #80AFFF; selection-color: #FFFFFF; } /* I don't really get this, and I don't guess I care anymore. It just makes * utterly no sense. I can make the backgrounds any color I want with a pixmap, * so I know I'm selecting for these, but the foreground color has had a sticky * override on it since a few sweeping changes ago, and I have no idea how to * solve it without resorting to this. */ QLabel#Humbug { color: #000000; } /* Hrm. Has no effect at all. Probably not worth much more bother, since Qt * automatically inverts the stock arrow pixmaps, and they're sort of legible, * but it might ultimately be worth subclassing QPlastiqueStyle in order to * specify different pixmaps, since this bit here doesn't seem to work. */ QFileDialog { leftarrow-icon: url(:pixmaps/style/arrow-left-inverted.png); rightarrow-icon: url(:pixmaps/style/arrow-right-inverted.png); uparrow-icon: url(:pixmaps/style/arrow-up-inverted.png); }