Skip to content
Permalink
Browse files

[themes] Properly style widget focus

  • Loading branch information
nirvn committed Feb 9, 2019
1 parent bf5b3f0 commit 3ae5038d7f823d6ca84496b5bff15b51d3073ccf
@@ -290,17 +290,6 @@ QComboBox::indicator {
selection-color:transparent;
}

QLineEdit:focus
{
border: 1px solid @selection;
}


QTextEdit:focus
{
border: 1px solid @selection;
}

/* ==================================================================================== */
/* SCROLL BAR */
/* ==================================================================================== */
@@ -719,6 +708,27 @@ QHeaderView::section {
padding: 0 0 0.1em 0.2em;
}

/* ==================================================================================== */
/* FOCUS */
/* ==================================================================================== */

QToolButton:focus, QPushButton:focus, QCheckBox:focus, QRadioButton:focus, QGroupBox:focus {
outline:1px solid @focusdark;
outline-radius: 0.2em;
}

QComboBox:focus, QAbstractSpinBox:focus, QLineEdit:focus, QPlainTextEdit:focus, QTextEdit:focus {
border:1px solid @focus;
}

QToolButton[autoRaise=true]:focus:!pressed {
border:1px solid @focusdark;
}

QToolButton[autoRaise=false]:focus:!pressed {
border:1px solid @focus;
}

/* ==================================================================================== */
/* QGIS-SPECIFIC TWEAKS */
/* ==================================================================================== */
@@ -733,6 +743,10 @@ QgsColorButton:hover, QgsColorRampButton:hover, QgsSymbolButton:hover, QgsFontBu
color:@itembackground;
}

QgsColorButton:focus, QgsColorRampButton:focus, QgsSymbolButton:focus, QgsFontButton:focus {
border:1px solid @focus;
}

QgsMessageBar QLabel, QgsMessageBar QTextEdit, QMessageBar QToolButton {
background: transparent;
border: none;
@@ -775,10 +789,17 @@ QgsMessageBar QScrollBar::down-arrow:vertical {
image: url(@theme_path/icons/arrow-down.svg);
}

QgsPropertyOverrideButton {
QgsPropertyOverrideButton, QgsPropertyOverrideButton:hover, QgsPropertyOverrideButton:pressed {
background: none;
border: 1px solid rgba(0, 0, 0, 0%);
padding: 0px;
}

QgsPropertyOverrideButton:focus {
border:1px solid @focusdark;
border-radius: 0.2em;
}

QListWidget#mOptionsListWidget {
background-color: @itemdarkbackground;
color: @itembackground;
@@ -12,3 +12,5 @@
@toggleon: #ee7913
@selection: #f0f0f0
@hover: #c7c7c7
@focusdark: rgba(0,0,0,100)
@focus: rgba(199,199,199,255)
@@ -303,17 +303,6 @@ QComboBox::indicator {
selection-color:transparent;
}

QLineEdit:focus
{
border: 1px solid @focus;
}


QTextEdit:focus
{
border: 1px solid @focus;
}

/* ==================================================================================== */
/* SCROLL BAR */
/* ==================================================================================== */
@@ -732,6 +721,27 @@ QHeaderView::section {
padding: 0 0 0.1em 0.2em;
}

QToolButton[autoRaise=true]:focus:!pressed {
border:1px solid @focusdark;
}

QToolButton[autoRaise=false]:focus:!pressed {
border:1px solid @focusdark;
}

/* ==================================================================================== */
/* FOCUS */
/* ==================================================================================== */

QToolButton:focus, QPushButton:focus, QCheckBox:focus, QRadioButton:focus, QGroupBox:focus {
outline:1px solid @focusdark;
outline-radius: 0.2em;
}

QComboBox:focus, QAbstractSpinBox:focus, QLineEdit:focus, QPlainTextEdit:focus, QTextEdit:focus {
border:1px solid @focusdark;
}

/* ==================================================================================== */
/* QGIS-SPECIFIC TWEAKS */
/* ==================================================================================== */
@@ -746,6 +756,10 @@ QgsColorButton:hover, QgsColorRampButton:hover, QgsSymbolButton:hover, QgsFontBu
color:@itembackground;
}

QgsColorButton:focus, QgsColorRampButton:focus, QgsSymbolButton:focus, QgsFontButton:focus {
border:1px solid @focusdark;
}

QgsMessageBar QLabel, QgsMessageBar QTextEdit, QMessageBar QToolButton, QMessageBar QToolButton::menu-button {
background: transparent;
border: none;
@@ -788,10 +802,17 @@ QgsMessageBar QScrollBar::down-arrow:vertical {
image: url(@theme_path/icons/arrow-down.svg);
}

QgsPropertyOverrideButton {
QgsPropertyOverrideButton, QgsPropertyOverrideButton:hover, QgsPropertyOverrideButton:pressed {
background: none;
border: 1px solid rgba(0, 0, 0, 0%);
padding: 0px;
}

QgsPropertyOverrideButton:focus {
border:1px solid @focusdark;
border-radius: 0.2em;
}

QListWidget#mOptionsListWidget {
background-color: @itembackground;
color: @text;
@@ -10,4 +10,5 @@
@toggleoff: #535353
@toggleon: #0f6e00
@selection: #0f6e00
@focusdark: rgba(215,128,26,100)
@focus: #d7801a

0 comments on commit 3ae5038

Please sign in to comment.
You can’t perform that action at this time.