-
Notifications
You must be signed in to change notification settings - Fork 704
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Linux: Split resize area too large #3020
Comments
I wonder if this will end up being a GTK issue and not ours. We're using a native GTK widget for this and as far as I know we don't define any of this, but its worth investigation. |
Yeah, I'd say that's a "feature" of GTK. Not even sure how you'd change that without some deep GTK magic. The workaround is to use the mouse to select from right-to-left, rather than selecting from left-to-right. |
Yep, my research is that this is just GTK doing this. I think this is acceptable. |
Facing the same issue. This means that sometime it is difficult to select characters and text that start at the left of the split. |
Having the same problem, reported as duplicate in #5630. Bit sad to hear this is acceptable. |
It is strange to me that this is a 'GTK issue', when other GTK apps on my system don't exhibit this behaviour. (Unless it's a GTK3 vs GTK4 issue? Or a Libadwaita issue?) I have noted in a related discussion that Nemo for example has a split divider between the left sidebar and the directory view, and it works as expected. In particular, the drag surface in Nemo and the drag cursor indicator are consistent, unlike Gostty. The drag surface in Nemo is also much narrower then in Ghostty. Edit: |
Confirming that this is indeed a Gtk 4 issue: The following minimal Gtk 3 app does not have the issue: # https://stackoverflow.com/a/69773849
import gi
gi.require_version("Gtk", "3.0")
from gi.repository import Gtk
class App(Gtk.Window):
"""The window."""
def __init__(self):
super().__init__()
self.connect("delete-event", Gtk.main_quit)
self.set_default_size(200, 200)
# The paned window
self.paned = Gtk.Paned()
self.add(self.paned)
# Widets to put in the paned window
self.label = Gtk.Label(label="Sidebar")
self.paned.add1(self.label)
self.button = Gtk.Button.new_with_label("Something else")
self.paned.add2(self.button)
self.show_all()
App()
Gtk.main() Updating this minimal app to Gtk 4, the issue appears: # https://stackoverflow.com/a/69773849
# https://github.com/Taiko2k/GTK4PythonTutorial
import gi
gi.require_version('Gtk', '4.0')
from gi.repository import Gtk
class MainWindow(Gtk.ApplicationWindow):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
self.set_default_size(200, 200)
# The paned window
self.paned = Gtk.Paned()
self.set_child(self.paned)
# Widets to put in the paned window
self.label = Gtk.Label(label="Sidebar")
self.paned.set_start_child(self.label)
self.button = Gtk.Button.new_with_label("Something else")
self.paned.set_end_child(self.button)
class MyApp(Gtk.Application):
def __init__(self, **kwargs):
super().__init__(**kwargs)
self.connect('activate', self.on_activate)
def on_activate(self, app):
self.win = MainWindow(application=app)
self.win.present()
app = MyApp(application_id="com.example.GtkApplication")
app.run() The issue remains if we use Adwaita: 6c6,7
< from gi.repository import Gtk
---
> gi.require_version('Adw', '1')
> from gi.repository import Gtk, Adw
25c26,27
< class MyApp(Gtk.Application):
---
>
> class MyApp(Adw.Application): Edit: I've opened an issue with GTK: https://gitlab.gnome.org/GNOME/gtk/-/issues/7330 |
Improves ghostty-org#3020. Based on recommendation from upstream Gtk issue: https://gitlab.gnome.org/GNOME/gtk/-/issues/4484#note_2362002 Without this, it's not possible to select the first character on the right-hand side of a split.
Improves ghostty-org#3020. Ensures that the drag handle for the pane separator never overlaps pane content. See recommendation in upstream Gtk issue: https://gitlab.gnome.org/GNOME/gtk/-/issues/4484#note_2362002
Improves ghostty-org#3020. Based on recommendation from upstream Gtk issue: https://gitlab.gnome.org/GNOME/gtk/-/issues/4484#note_2362002 Without this, it's not possible to select the first character on the right-hand side of a split.
Improves ghostty-org#3020. Based on recommendation from upstream Gtk issue: https://gitlab.gnome.org/GNOME/gtk/-/issues/4484#note_2362002 Without this, it's not possible to select the first character on the right-hand side of a split.
Improves #3020. Based on recommendation from upstream Gtk issue: https://gitlab.gnome.org/GNOME/gtk/-/issues/4484#note_2362002 Without this, it's not possible to select the first character on the right-hand side of a split.
Keeping this open since the issue isn't 100% solved yet. |
Improves ghostty-org#3020. Ensures that the drag handle for the pane separator never overlaps pane content. See recommendation in upstream Gtk issue: https://gitlab.gnome.org/GNOME/gtk/-/issues/4484#note_2362002
Improves ghostty-org#3020. Ensures that the drag handle for the pane separator never overlaps pane content. See recommendation in upstream Gtk issue: https://gitlab.gnome.org/GNOME/gtk/-/issues/4484#note_2362002 Also add WIP CSS to style the pane handle with a single centered 1px line, rather than two 1px borders.
Improves ghostty-org#3020. Ensures that the drag handle for the pane separator never overlaps pane content. See recommendation in upstream Gtk issue: https://gitlab.gnome.org/GNOME/gtk/-/issues/4484#note_2362002 Also add WIP CSS to style the pane handle with a single centered 1px line, rather than two 1px borders.
I've added some partial progress to a discussion here: #6059. Suggestions welcome! |
Improves ghostty-org#3020. Ensures that the drag handle for the pane separator never overlaps pane content. See recommendation in upstream Gtk issue: https://gitlab.gnome.org/GNOME/gtk/-/issues/4484#note_2362002 Also add WIP CSS to style the pane handle with a single centered 1px line, rather than two 1px borders.
Issue
The area in which you can click and drag to resize splits is too large, it is even possible to resize the splits without the cursor showing that it may be resized. With the horizontal split configuration shown below, the offending area seems to be larger on the edge bordering the right split. In the video, you can see that I can select starting from the third character from the left on the split border but not any closer to the border.
I can only reproduce this on my Linux box, not on macOS.
split-shenanagins.mp4
Expectation
I would expect the following regardless of the OS in use, currently these expectations seem to be met on macOS but not with my Linux setup:
Configuration
Running on NixOS with GNOME.
ghostty built from flake with commit fa3896b.
The text was updated successfully, but these errors were encountered: