
/****************************************************************************
* General
****************************************************************************/

QWidget {
    font-size: 14px;
}

QAbstractScrollArea {
    background: #202020;
}

QLineEdit {
    background: #606060;
    min-height: 16px;
    padding-left: 2px;
    padding-right: 2px;
}

QToolTip {
    font-size: 14px;
    background: #ffe8c0;
    color: #806020;
    padding: 2px;
}

/****************************************************************************
* Toolbars
****************************************************************************/

QMenuBar {
    background: #2C2C2C;
}

QMenuBar::item {
    padding: 4px 10px;
    padding-bottom: 2px;
    background: #2C2C2C;
}

QMenuBar::item:selected {
    background: #2C6080;
}

QToolBar {
    background: #2C2C2C;
    border-bottom: 1px solid #505050;
}

QToolBar#modeToolBar {
    background: #363636;
}

QToolBar#focusToolBar {
    background: #404040;
}

QToolBar#userToolBar {
    background: #4A4A4A;
}

QToolBar::separator {
    background: rgba(128,128,128,50%);
    width: 0px;
    margin: 4px 8px;
}

QStatusBar {
    background: #2C2C2C;
    padding: 2px;
    padding-left: 5px;
    padding-right: 5px;
}

/****************************************************************************
* Menus
****************************************************************************/

QMenu {
    background: #2C2C2C;
}

QMenu::item {
    background: #2C2C2C;
}

QMenu::item * {
    background: #2C2C2C; /* does not seem to do much */
    margin: 3px;
}

QMenu::item * QToolTip {
    background: #ffe8c0;
}

QMenu::item:selected {
    background: #2C6080;
}

QMenu::item:disabled {
    background: #2C2C2C;
    color: #808080;
}

QMenu::right-arrow {
    border-image: url($TEXMACS_PATH/misc/pixmaps/modern/tm_right_arrow_dark.png) 7 7 7 13;
}

QMenu::separator {
    background: #686868;
    height: 1px;
    margin: 6px 3px;
}

/****************************************************************************
* Lists
****************************************************************************/

QListView {
    background: #606060;
}

QListView QAbstractScrollArea {
    background: #606060;
}

QListView::item:hover {
    background: #404040;
}

QListView::item:selected {
    background: #2C6080;
}

QComboBox {
    background: #606060;
    padding: 3px;
    padding-left: 5px;
    padding-right: 5px;
    border: 0px;
    border-radius: 5px;
    min-height: 18px;
}

QComboBox::drop-down {
    background: #606060;
    border: 0px;
    border-top-right-radius: 5px;
    border-bottom-right-radius: 5px;
}

QComboBox::down-arrow {
    border-image: url($TEXMACS_PATH/misc/pixmaps/modern/tm_down_arrow_dark.png) 0 0 0 0 stretch stretch;
}

QComboBox QAbstractItemView {
    background: #404040;
}

/****************************************************************************
* Tabs
****************************************************************************/

QTabBar::tab {
    background: #808080;
    margin-top: 2px;
    padding: 3px;
    padding-left: 10px;
    padding-right: 10px;
    border: 1px solid #A0A0A0;
    border-top-left-radius: 5px;
    border-top-right-radius: 5px;
}

QTabBar::tab::selected {
    background: #3C3C3C;
    margin-top: 0px;
    padding: 3px;
    padding-left: 10px;
    padding-right: 10px;
    border: 1px solid #A0A0A0;
    border-bottom: 0px;
    border-top-left-radius: 5px;
    border-top-right-radius: 5px;
}

/****************************************************************************
* Buttons
****************************************************************************/

QPushButton {
    background: #707070;
    padding: 3px;
    padding-left: 5px;
    padding-right: 5px;
    border: 1px solid #A0A0A0;
    border-right: 1px solid #404040;
    border-bottom: 1px solid #404040;
    border-radius: 5px;
}

QPushButton:pressed {
    background: #303030;
    padding: 5px;
    padding-left: 5px;
    padding-right: 5px;
    margin-left: 3px;
    margin-right: 3px;
    border: 1px solid #606060;
    border-top: 1px solid #000000;
    border-left: 1px solid #000000;
    border-radius: 5px;
}

QToolButton {
    background: none;
    padding-left: 0px;
    padding-right: 0px;
}

QToolButton:hover {
    background: none;
    /* FIXME: bug when using a color */
}

NomacQToolButton:hover {
    background: #585858;
    border: 0px;
    border-radius: 3px;
}

QToolButton:pressed, QToolButton:checked {
    background: #808080;
    border: 0px;
    border-radius: 3px;
}

QToolButton::menu-indicator {
    border: none;
    background: none;
    image: none;
}

QToolButton::disabled {
    color: #909090;
}

/****************************************************************************
* Side tools
****************************************************************************/

QDockWidget#sideTools::title {
    background: #2C2C2C;
    text-align: center;
}

QDockWidget#sideTools QWidget#title {
    background: #2C2C2C;
    font-weight: bold;
}

QDockWidget#sideTools QWidget#title * {
    background: #2C2C2C;
    font-weight: bold;
    margin: 5px;
}

QDockWidget#sideTools QWidget#subtitle {
    font-weight: bold;
}

QDockWidget#sideTools QWidget#subtitle * {
    font-weight: bold;
    margin: 5px;
}

QDockWidget#sideTools QWidget#discrete * {
    color: #B0B0B0;
    font-size: 12px;
}

QDockWidget#sideTools QWidget#discrete QPushButton {
    background: none;
    border: none;
}

QDockWidget#sideTools QWidget#discrete QPushButton:hover {
    background: #4C4C4C;
    border: none;
}

QDockWidget#sideTools QWidget#discrete QPushButton:pressed {
    background: #303030;
    border: none;
}

/****************************************************************************
* Tab bar with several options for sections
****************************************************************************/

QDockWidget#sideTools QWidget#sections {
    background: #202020;
    color: #808080;
    font-weight: bold;
    border-top: 10px solid #202020;
    border-bottom: 5px solid #2C2C2C;
    padding: 0px;
    margin: 0px;
}

QDockWidget#sideTools QWidget#sections QPushButton {
    background: #202020;
    color: #808080;
    font-weight: bold;
    border: none;
    border-top: 10px solid #202020;
    border-bottom: 5px solid #2C2C2C;
    border-radius: 0px;
    padding: 5px 10px;
    padding-bottom: 10px;
    margin: 0px;
}

QDockWidget#sideTools QWidget#sections QPushButton:hover {
    background: #383838;
    color: #B0B0B0;
    border: none;
    border-radius: 5px;
    padding: 5px;
    margin-top: 10px;
    margin-bottom: 10px;
}

QDockWidget#sideTools QWidget#sections QPushButton:pressed {
    background: #101010;
    color: #B0B0B0;
    border: none;
    border-radius: 5px;
    padding: 5px;
}

QDockWidget#sideTools QWidget#sections QWidget#active-section QPushButton,
QDockWidget#sideTools QWidget#sections QWidget#active-section QPushButton:hover,
QDockWidget#sideTools QWidget#sections QWidget#active-section QPushButton:pressed {
    background: #2C2C2C;
    color: #E0E0E0;
    border: none;
    border-bottom: 10px solid #2C2C2C;
    border-radius: 0px;
    border-top-left-radius: 5px;
    border-top-right-radius: 5px;
    padding: 5px 10px;
    padding-bottom: 5px;
    margin: 0px;
    margin-top: 10px;
}

/****************************************************************************
* Sections with tab bars
****************************************************************************/

QDockWidget#sideTools QWidget#section {
    background: #2C2C2C;
    font-weight: bold;
}

QDockWidget#sideTools QWidget#section * {
    background: #2C2C2C;
    font-weight: bold;
    margin: 5px;
    margin-bottom: 3px;
}

QDockWidget#sideTools QWidget#section-tabs {
    background: #2C2C2C;
    color: #808080;
    font-weight: bold;
    padding: 0px;
    margin: 0px;
}

QDockWidget#sideTools QWidget#section-tabs QPushButton {
    background: #2C2C2C;
    color: #808080;
    font-weight: bold;
    border: none;
    border-radius: 0px;
    padding: 5px 8px;
    margin: 0px;
}

QDockWidget#sideTools QWidget#section-tabs QPushButton:hover {
    background: #383838;
    color: #B0B0B0;
    border-top-left-radius: 5px;
    border-top-right-radius: 5px;
}

QDockWidget#sideTools QWidget#section-tabs QPushButton:pressed {
    background: #202020;
    color: #B0B0B0;
    border-top-left-radius: 5px;
    border-top-right-radius: 5px;
}

QDockWidget#sideTools QWidget#section-tabs QWidget#section-active-tab QPushButton {
    background: #404040;
    color: #E0E0E0;
    font-weight: bold;
    border: none;
    border-top-left-radius: 5px;
    border-top-right-radius: 5px;
    padding: 5px 8px;
    margin: 0px;
}

/****************************************************************************
* Adjustments for Windows
****************************************************************************/

MingwQScrollBar {
    background: #404040;
}

MingwQScrollBar::handle {
    background: #606060;
    border: 0px;
    margin: 2px;
    min-height: 20px;
}

MingwQScrollBar::add-line:horizontal,
MingwQScrollBar::sub-line:horizontal,
MingwQScrollBar::add-page:horizontal,
MingwQScrollBar::sub-page:horizontal,
MingwQScrollBar::add-line:vertical,
MingwQScrollBar::sub-line:vertical,
MingwQScrollBar::add-page:vertical,
MingwQScrollBar::sub-page:vertical {
    background: none;
    border: 0px;
}

MingwQStatusBar::item {
    background: #2C2C2C;
    border: 0px;
}

MingwQMenu::item {
    padding-left: 15px;
    padding-right: 12px;
}

MingwQMenu::right_arrow {
    border-image: url("$TEXMACS_PATH/misc/pixmaps/modern/tm_right_arrow_dark.png") 7 7 7 7;
}

MingwQComboBox::drop_down {
    padding-right: 10px;
}

MingwQComboBox::down_arrow {
    border-image: url("$TEXMACS_PATH/misc/pixmaps/modern/tm_down_arrow_dark.png") 7 7 7 7 stretch stretch;
}
