Repository: qutebrowser/qutebrowser

Issue:
New color options (#707) breaks input context menu.
Since merging #707, the context menu in the statusbar looks different.

old:

![old](https://cloud.githubusercontent.com/assets/625793/8105581/bce00f90-103a-11e5-9cb3-0689ebceefb8.png)

new:

![new](https://cloud.githubusercontent.com/assets/625793/8105584/c18b2cb4-103a-11e5-9f82-44ef1cec1b1d.png)

While it looks quite good, it doesn't show disabled items, etc.

I think the stylesheet should be adjusted to not style `*`, and instead only style specific statusbar items. Maybe the stylesheet syntax makes it possible to set "tags"/classes on widgets somehow?

@ProtractorNinja - I'd be glad if you could look at this :wink:



Discussion:

Resolving patch:
diff --git a/qutebrowser/mainwindow/statusbar/bar.py b/qutebrowser/mainwindow/statusbar/bar.py
--- a/qutebrowser/mainwindow/statusbar/bar.py
+++ b/qutebrowser/mainwindow/statusbar/bar.py
@@ -108,50 +108,58 @@ class StatusBar(QWidget):
     STYLESHEET = """
 
         QWidget#StatusBar,
-        QWidget#StatusBar * {
+        QWidget#StatusBar QLabel,
+        QWidget#StatusBar QLineEdit {
             {{ font['statusbar'] }}
             {{ color['statusbar.bg'] }}
             {{ color['statusbar.fg'] }}
         }
 
         QWidget#StatusBar[caret_mode="on"],
-        QWidget#StatusBar[caret_mode="on"] * {
+        QWidget#StatusBar[caret_mode="on"] QLabel,
+        QWidget#StatusBar[caret_mode="on"] QLineEdit {
             {{ color['statusbar.fg.caret'] }}
             {{ color['statusbar.bg.caret'] }}
         }
 
         QWidget#StatusBar[caret_mode="selection"],
-        QWidget#StatusBar[caret_mode="selection"] * {
+        QWidget#StatusBar[caret_mode="selection"] QLabel,
+        QWidget#StatusBar[caret_mode="selection"] QLineEdit {
             {{ color['statusbar.fg.caret-selection'] }}
             {{ color['statusbar.bg.caret-selection'] }}
         }
 
         QWidget#StatusBar[severity="error"],
-        QWidget#StatusBar[severity="error"] * {
+        QWidget#StatusBar[severity="error"] QLabel,
+        QWidget#StatusBar[severity="error"] QLineEdit {
             {{ color['statusbar.fg.error'] }}
             {{ color['statusbar.bg.error'] }}
         }
 
         QWidget#StatusBar[severity="warning"],
-        QWidget#StatusBar[severity="warning"] * {
+        QWidget#StatusBar[severity="warning"] QLabel,
+        QWidget#StatusBar[severity="warning"] QLineEdit {
             {{ color['statusbar.fg.warning'] }}
             {{ color['statusbar.bg.warning'] }}
         }
 
         QWidget#StatusBar[prompt_active="true"],
-        QWidget#StatusBar[prompt_active="true"] * {
+        QWidget#StatusBar[prompt_active="true"] QLabel,
+        QWidget#StatusBar[prompt_active="true"] QLineEdit {
             {{ color['statusbar.fg.prompt'] }}
             {{ color['statusbar.bg.prompt'] }}
         }
 
         QWidget#StatusBar[insert_active="true"],
-        QWidget#StatusBar[insert_active="true"] * {
+        QWidget#StatusBar[insert_active="true"] QLabel,
+        QWidget#StatusBar[insert_active="true"] QLineEdit {
             {{ color['statusbar.fg.insert'] }}
             {{ color['statusbar.bg.insert'] }}
         }
 
         QWidget#StatusBar[command_active="true"],
-        QWidget#StatusBar[command_active="true"] * {
+        QWidget#StatusBar[command_active="true"] QLabel,
+        QWidget#StatusBar[command_active="true"] QLineEdit {
             {{ color['statusbar.fg.command'] }}
             {{ color['statusbar.bg.command'] }}
         }


Test patch: