Update tab styling.
This commit is contained in:
+8
-5
@@ -1998,14 +1998,17 @@ fn applySidebarCollapsed(self: *Window, collapsed: bool) void {
|
||||
for (self.tabs.items) |tab| self.applyRowCollapsed(tab);
|
||||
}
|
||||
|
||||
/// One row's share of the collapse: everything but the emoji (or kind icon)
|
||||
/// goes. The status dot goes too — the bar down the row's leading edge carries
|
||||
/// the state at this width (with a wash behind it for the states that have one),
|
||||
/// and it was designed to be the glanceable half of the pair anyway.
|
||||
/// One row's share of the collapse: the title and the close button go, the
|
||||
/// emoji (or kind icon) and the status dot stay.
|
||||
///
|
||||
/// The dot used to go as well, back when every state also drew a bar down the
|
||||
/// row's leading edge and that bar could carry the state on its own. Only
|
||||
/// "finished" draws one now, so at this width the dot is the whole signal for
|
||||
/// the other three — and a collapsed sidebar is exactly where you are relying on
|
||||
/// a glance rather than on reading anything.
|
||||
fn applyRowCollapsed(self: *Window, tab: *Tab) void {
|
||||
const shown: c_int = @intFromBool(!self.sidebar_collapsed);
|
||||
tab.label.as(gtk.Widget).setVisible(shown);
|
||||
tab.dot.as(gtk.Widget).setVisible(shown);
|
||||
tab.close.as(gtk.Widget).setVisible(shown);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user