Skip to content

Commit

Permalink
Revert left clicking, the overlay breaks scrolling
Browse files Browse the repository at this point in the history
  • Loading branch information
kra-mo committed Dec 22, 2023
1 parent c0bf3c1 commit e529ac7
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 22 deletions.
13 changes: 1 addition & 12 deletions hyperplane/gtk/path-bar.blp
Original file line number Diff line number Diff line change
Expand Up @@ -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 [
Expand Down
2 changes: 1 addition & 1 deletion hyperplane/gtk/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
9 changes: 0 additions & 9 deletions hyperplane/path_bar.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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):
Expand Down Expand Up @@ -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()

0 comments on commit e529ac7

Please sign in to comment.