diff --git a/hyperplane/gtk/path-bar.blp b/hyperplane/gtk/path-bar.blp index 95fbf45..540602e 100644 --- a/hyperplane/gtk/path-bar.blp +++ b/hyperplane/gtk/path-bar.blp @@ -5,18 +5,7 @@ template $HypPathBar : ScrolledWindow { hscrollbar-policy: external; Viewport viewport { - Overlay { - [overlay] - Box segments_box { - valign: start; - halign: start; - } - - Box dummy_box { - vexpand: true; - hexpand: true; - } - } + Box segments_box {} } styles [ diff --git a/hyperplane/gtk/style.css b/hyperplane/gtk/style.css index 4f1ad32..63246f2 100644 --- a/hyperplane/gtk/style.css +++ b/hyperplane/gtk/style.css @@ -30,7 +30,7 @@ rubberband { border-right: solid 1px @borders; border-radius: 0px 6px 6px 0px; } -.path-bar > viewport > overlay > box > revealer > button { +.path-bar > viewport > box > revealer > button { padding: 2px 9px; margin: 3px; border-radius: 4px; diff --git a/hyperplane/path_bar.py b/hyperplane/path_bar.py index f8917da..b7ce409 100644 --- a/hyperplane/path_bar.py +++ b/hyperplane/path_bar.py @@ -34,8 +34,6 @@ class HypPathBar(Gtk.ScrolledWindow): viewport: Gtk.Viewport = Gtk.Template.Child() segments_box: Gtk.Box = Gtk.Template.Child() - # A box for capturing left clicks on the bar itself, not a segment - dummy_box: Gtk.Box = Gtk.Template.Child() segments: list separators: dict @@ -47,10 +45,6 @@ def __init__(self, **kwargs) -> None: self.separators = {} self.tags = False - left_click = Gtk.GestureClick(button=Gdk.BUTTON_PRIMARY) - left_click.connect("released", self.__left_click) - self.dummy_box.add_controller(left_click) - def remove(self, n: int) -> None: """Removes `n` number of segments form self, animating them.""" for _index in range(n): @@ -148,6 +142,3 @@ def __remove_child(self, parent: Gtk.Box, child: Gtk.Widget) -> None: # This is so GTK doesn't freak out when the child isn't in the parent anymore if child.get_parent == parent: parent.remove(child) - - def __left_click(self, *_args) -> None: - self.get_root().lookup_action("toggle-path-bar").activate()