Skip to content
This repository has been archived by the owner on May 17, 2024. It is now read-only.

Commit

Permalink
Headerbar: Use button box for path crumbs
Browse files Browse the repository at this point in the history
  • Loading branch information
teejee2008 committed May 21, 2017
1 parent daf6130 commit a3d4788
Show file tree
Hide file tree
Showing 2 changed files with 479 additions and 17 deletions.
22 changes: 5 additions & 17 deletions src/Gtk/MainHeaderBar.vala
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public class MainHeaderBar : Gtk.HeaderBar {
}
}

private Gtk.Box crumbs;
private Gtk.ButtonBox crumbs;
private Gtk.ScrolledWindow scrolled;
private ViewPopover view_popover;
private Gtk.MenuButton btn_menu;
Expand Down Expand Up @@ -244,9 +244,9 @@ public class MainHeaderBar : Gtk.HeaderBar {
//scrolled.set_shadow_type(ShadowType.ETCHED_IN);
this.pack_start(scrolled);

crumbs = new Gtk.Box(Gtk.Orientation.HORIZONTAL, 3);
//crumbs.set_layout(Gtk.ButtonBoxStyle.START);
//crumbs.spacing = 0;
crumbs = new Gtk.ButtonBox(Gtk.Orientation.HORIZONTAL);
crumbs.set_layout(Gtk.ButtonBoxStyle.EXPAND);
crumbs.set_homogeneous(false);
crumbs.margin = 0;
scrolled.add(crumbs);

Expand Down Expand Up @@ -331,11 +331,7 @@ public class MainHeaderBar : Gtk.HeaderBar {

refresh_visibility();

if (!this.visible){
//window.decorated = true;
//window.set_titlebar(null);
return;
}
if (!this.visible){ return; }

refresh_crumbs();

Expand Down Expand Up @@ -407,13 +403,6 @@ public class MainHeaderBar : Gtk.HeaderBar {
}

add_crumb(crumbs, part, link_path);

//if (index < parts.length - 1){
//var lbl3 = new Gtk.Label(">");
//lbl3.margin_bottom = 1;
//crumbs.add(lbl3);
//gtk_apply_css( { lbl3 }, "padding-top: 0px; padding-bottom: 0px; margin-top: 0px; margin-bottom: 0px;");
//}
}

crumbs.show_all();
Expand All @@ -429,7 +418,6 @@ public class MainHeaderBar : Gtk.HeaderBar {

var label = new Gtk.Label(text);
label.margin = 0;
label.margin_left = label.margin_right = 0;
button.add(label);

//button.relief = Gtk.ReliefStyle.NORMAL;
Expand Down
Loading

0 comments on commit a3d4788

Please sign in to comment.