diff options
author | Christian Dywan <christian@twotoasts.de> | 2018-08-28 18:11:47 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-08-28 18:11:47 +0200 |
commit | 4061667dea7a9a24c9b8b734d740233c609f13d7 (patch) | |
tree | 5af1bcea07fe3d001b0d7dc7cd7ddfd7d9996853 | |
parent | fc7ef0d06a1d7a51c809af1080b8c85c1e3682a7 (diff) | |
download | midori-git-4061667dea7a9a24c9b8b734d740233c609f13d7.tar.gz |
Always show title of the only pinned tab (#19)
The only visible app should always show a title, even if it's pinned.
-rw-r--r-- | core/tally.vala | 8 | ||||
-rw-r--r-- | data/gtk3.css | 5 |
2 files changed, 9 insertions, 4 deletions
diff --git a/core/tally.vala b/core/tally.vala index 16382349..7efa8d66 100644 --- a/core/tally.vala +++ b/core/tally.vala @@ -18,6 +18,7 @@ namespace Midori { bool _show_close; public bool show_close { get { return _show_close; } set { _show_close = value; + caption.visible = !(tab.pinned && _show_close); close.visible = _show_close && !tab.pinned; } } @@ -51,8 +52,9 @@ namespace Midori { tooltip_text: tab.display_title, visible: tab.visible); tab.bind_property ("display-uri", this, "uri"); + title = tab.display_title; tab.bind_property ("display-title", this, "title"); - tab.bind_property ("display-title", this, "tooltip-text"); + bind_property ("title", this, "tooltip-text"); tab.bind_property ("visible", this, "visible"); close.clicked.connect (() => { tab.try_close (); }); tab.notify["is-loading"].connect ((pspec) => { @@ -61,9 +63,9 @@ namespace Midori { }); // Pinned tab style: icon only - caption.visible = !tab.pinned; + caption.visible = !(tab.pinned && _show_close); tab.notify["pinned"].connect ((pspec) => { - caption.visible = !tab.pinned; + caption.visible = !(tab.pinned && _show_close); close.visible = _show_close && !tab.pinned; }); } diff --git a/data/gtk3.css b/data/gtk3.css index 7925b7d2..218add03 100644 --- a/data/gtk3.css +++ b/data/gtk3.css @@ -17,12 +17,15 @@ } .tab:checked { box-shadow: inset 0 3px @theme_selected_bg_color; + font-weight: bold; } .tab label { text-shadow: none; } -.tab:backdrop, .tab:only-child { +.tab:backdrop { border: none; +} +.titlebar .tab:only-child { box-shadow: none; } .tab button { |