summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Dywan <christian@twotoasts.de>2018-08-26 14:59:28 +0200
committerChristian Dywan <christian@twotoasts.de>2018-08-26 14:59:28 +0200
commit8ca16f16e342866567ec892dd75ad7ad231459b1 (patch)
tree2a58f500e56a8f9bca3f91b47db8644d5dfc7de3
parent57fa97773fc1f708fe572e8ed9fd9bf7a2c8f740 (diff)
downloadmidori-git-only_pinned_tab.tar.gz
Always show title of the only pinned tabonly_pinned_tab
-rw-r--r--core/tally.vala8
-rw-r--r--data/gtk3.css5
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 {