Change the selectors to target terminal window only, fixing the prefs window

This commit is contained in:
Stephen Boddy 2016-12-10 15:14:06 +01:00
parent a3fbd1e33c
commit 8878aef3d2
3 changed files with 117 additions and 28 deletions

View File

@ -385,20 +385,20 @@ class Terminator(Borg):
.terminator-terminal-window {
background-color: alpha(@theme_bg_color,0); }
.notebook.header {
.terminator-terminal-window .notebook.header {
background-color: @theme_bg_color; }
.pane-separator {
.terminator-terminal-window .pane-separator {
background-color: @theme_bg_color; }
.terminator-terminal-searchbar {
.terminator-terminal-window .terminator-terminal-searchbar {
background-color: @theme_bg_color; }
"""
# Fix several themes that put a borders, corners, or backgrounds around
# viewports, making the titlebar look bad.
css += """
GtkViewport {
.terminator-terminal-window GtkViewport {
border-width: 0px;
border-radius: 0px;
background-color: transparent; }
@ -430,7 +430,7 @@ class Terminator(Borg):
# Size the GtkPaned splitter handle size.
if self.config['handle_size'] in xrange(0, 21):
css = """
GtkPaned {
.terminator-terminal-window GtkPaned {
-GtkPaned-handle-size: %s; }
""" % self.config['handle_size']
style_provider = Gtk.CssProvider()

View File

@ -5,7 +5,7 @@ Might want to have a seperate option for "shrinking" the tabs, by
nuking the padding/borders in the tabs.
*/
.notebook.header {
.terminator-terminal-window .notebook.header {
border-width: 0; /* set below depending on position of tab bar */
border-color: shade (@bg_color, 0.82);
border-style: solid;
@ -14,19 +14,19 @@ nuking the padding/borders in the tabs.
}
/* Draw a border between tabs and content ... */
.notebook.header.top { border-bottom-width: 1px; }
.notebook.header.right { border-left-width: 1px; }
.notebook.header.left { border-right-width: 1px; }
.notebook.header.bottom { border-top-width: 1px; }
.terminator-terminal-window .notebook.header.top { border-bottom-width: 1px; }
.terminator-terminal-window .notebook.header.right { border-left-width: 1px; }
.terminator-terminal-window .notebook.header.left { border-right-width: 1px; }
.terminator-terminal-window .notebook.header.bottom { border-top-width: 1px; }
/* ... unless the content is in a frame (thus having a border itself */
.notebook.header.frame.top { border: none; }
.notebook.header.frame.right { border: none; }
.notebook.header.frame.right { border: none; }
.notebook.header.frame.bottom { border: none; }
.terminator-terminal-window .notebook.header.frame.top { border: none; }
.terminator-terminal-window .notebook.header.frame.right { border: none; }
.terminator-terminal-window .notebook.header.frame.right { border: none; }
.terminator-terminal-window .notebook.header.frame.bottom { border: none; }
.notebook tab {
.terminator-terminal-window .notebook tab {
background-color: shade(@bg_color, 0.7);
border-image: none;
border-style: solid;
@ -34,56 +34,56 @@ nuking the padding/borders in the tabs.
}
/* give active tab a background, as it might be dragged across of others when reordering */
.notebook tab:active {
.terminator-terminal-window .notebook tab:active {
background-color: @bg_color;
}
.notebook tab.top:active { padding-bottom: 3px; }
.notebook tab.bottom:active { padding-top: 3px; }
.notebook tab.left:active { padding-right: 5px; }
.notebook tab.right:active { padding-left: 5px; }
.terminator-terminal-window .notebook tab.top:active { padding-bottom: 3px; }
.terminator-terminal-window .notebook tab.bottom:active { padding-top: 3px; }
.terminator-terminal-window .notebook tab.left:active { padding-right: 5px; }
.terminator-terminal-window .notebook tab.right:active { padding-left: 5px; }
.notebook tab.top {
.terminator-terminal-window .notebook tab.top {
padding: 4px 6px 2px 6px;
border-width: 1px 1px 0px 1px;
border-radius: 8px 8px 0px 0px;
}
.notebook tab.bottom {
.terminator-terminal-window .notebook tab.bottom {
padding: 2px 6px 4px 6px;
border-width: 0px 1px 1px 1px;
border-radius: 0px 0px 8px 8px;
}
.notebook tab.left {
.terminator-terminal-window .notebook tab.left {
padding: 2px 4px 2px 6px;
border-width: 1px 0px 1px 1px;
border-radius: 8px 0px 0px 8px;
}
.notebook tab.right {
.terminator-terminal-window .notebook tab.right {
padding: 2px 6px 2px 4px;
border-width: 1px 1px 1px 0px;
border-radius: 0px 8px 8px 0px;
}
.notebook tab .button {
.terminator-terminal-window .notebook tab .button {
background-color: transparent;
padding: 1px;
}
/* Draw a focus ring around labels in tabs */
.notebook tab GtkLabel {
.terminator-terminal-window .notebook tab GtkLabel {
border: 1px solid transparent;
border-radius: 5px;
}
.notebook:focus tab GtkLabel.active-page {
.terminator-terminal-window .notebook:focus tab GtkLabel.active-page {
border-color: @focus_color;
background-color: @focus_bg_color;
}
.notebook GtkDrawingArea {
.terminator-terminal-window .notebook GtkDrawingArea {
background-color: shade (@bg_color, 1.02);
}

View File

@ -0,0 +1,89 @@
/*
Some basic playing copying out the GNOME-Terminal style tab headers.
Might want to have a seperate option for "shrinking" the tabs, by
nuking the padding/borders in the tabs.
*/
.terminator-terminal-window .notebook.header {
border-width: 0; /* set below depending on position of tab bar */
border-color: shade (@bg_color, 0.82);
border-style: solid;
border-radius: 0px 0px 0px 0px;
background-color: @dark_bg_color;
}
/* Draw a border between tabs and content ... */
.terminator-terminal-window .notebook.header.top { border-bottom-width: 1px; }
.terminator-terminal-window .notebook.header.right { border-left-width: 1px; }
.terminator-terminal-window .notebook.header.left { border-right-width: 1px; }
.terminator-terminal-window .notebook.header.bottom { border-top-width: 1px; }
/* ... unless the content is in a frame (thus having a border itself */
.terminator-terminal-window .notebook.header.frame.top { border: none; }
.terminator-terminal-window .notebook.header.frame.right { border: none; }
.terminator-terminal-window .notebook.header.frame.right { border: none; }
.terminator-terminal-window .notebook.header.frame.bottom { border: none; }
.terminator-terminal-window .notebook tab {
background-color: shade(@bg_color, 0.7);
border-image: none;
border-style: solid;
border-color: @dark_bg_color;
}
/* give active tab a background, as it might be dragged across of others when reordering */
.terminator-terminal-window .notebook tab:active {
background-color: @bg_color;
}
.terminator-terminal-window .notebook tab.top:active { padding-bottom: 3px; }
.terminator-terminal-window .notebook tab.bottom:active { padding-top: 3px; }
.terminator-terminal-window .notebook tab.left:active { padding-right: 5px; }
.terminator-terminal-window .notebook tab.right:active { padding-left: 5px; }
.terminator-terminal-window .notebook tab.top {
padding: 4px 6px 2px 6px;
border-width: 1px 1px 0px 1px;
border-radius: 8px 8px 0px 0px;
}
.terminator-terminal-window .notebook tab.bottom {
padding: 2px 6px 4px 6px;
border-width: 0px 1px 1px 1px;
border-radius: 0px 0px 8px 8px;
}
.terminator-terminal-window .notebook tab.left {
padding: 2px 4px 2px 6px;
border-width: 1px 0px 1px 1px;
border-radius: 8px 0px 0px 8px;
}
.terminator-terminal-window .notebook tab.right {
padding: 2px 6px 2px 4px;
border-width: 1px 1px 1px 0px;
border-radius: 0px 8px 8px 0px;
}
.terminator-terminal-window .notebook tab .button {
background-color: transparent;
padding: 1px;
}
/* Draw a focus ring around labels in tabs */
.terminator-terminal-window .notebook tab GtkLabel {
border: 1px solid transparent;
border-radius: 5px;
}
.terminator-terminal-window .notebook:focus tab GtkLabel.active-page {
border-color: @focus_color;
background-color: @focus_bg_color;
}
.terminator-terminal-window .notebook GtkDrawingArea {
background-color: shade (@bg_color, 1.02);
}