-
-
Notifications
You must be signed in to change notification settings - Fork 5
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
AppChooser: Fix listbox being unselectable #60
Conversation
Works well for me. But the large space in the bottom is undraggable, which is to be expected. |
Now the bottom area also should be draggable. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works fine for me!
var grid = new Gtk.Grid () { | ||
orientation = Gtk.Orientation.VERTICAL, | ||
column_spacing = 12, | ||
row_spacing = 6, | ||
margin = 12 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why remove the margin here? the logic here is that this set the external margins, so that the header and button box only need to deal with the internal margins (margin_botton for the header and margin_top for the button box).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Leaving this 12px means the 4 edges of the dialog won't receive the key press events like the secondary click for the context menu and dragging for window movement. So I moved all margins into each grid. I'm not sure if these changes I made is correct though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm unsure about merging this PR, since the issue this fix isn't reproducible with the Gtk4 branch. but i won't be against if it still wanted.
expand = true | ||
vexpand = true, | ||
hexpand = true, | ||
activate_on_single_click = false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure about unsetting activate_on_single_click
, i would prefer that we handle activating/selecting the row by ourselves in the ::row_activated
signal.
var window_handle_top = new Hdy.WindowHandle (); | ||
window_handle_top.add (top_grid); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
var window_handle_top = new Hdy.WindowHandle (); | |
window_handle_top.add (top_grid); | |
var window_handle_top = new Hdy.WindowHandle () { | |
child = top_grid | |
}; |
the same for the window_handle_bottom
.
var content_grid = new Gtk.Grid () { | ||
orientation = Gtk.Orientation.VERTICAL, | ||
column_spacing = 12, | ||
row_spacing = 6, | ||
margin_start = 12, | ||
margin_end = 12 | ||
}; | ||
|
||
content_grid.attach (frame, 0, 0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
frame
should be added directly in the final box.
var button_box = new Gtk.ButtonBox (Gtk.Orientation.HORIZONTAL) { | ||
layout_style = Gtk.ButtonBoxStyle.END, | ||
margin_top = 12, | ||
margin = 12, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
margin = 12, | |
margin_top = 6, | |
margin_start = 12, | |
margin_end = 12, | |
margin_bottom = 12, |
margin_start = 12, | ||
margin_end = 12, | ||
margin_top = 12 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
margin_start = 12, | |
margin_end = 12, | |
margin_top = 12 | |
margin_top = 12, | |
margin_start = 12, | |
margin_end = 12, | |
margin_bottom = 6 |
box.pack_start (window_handle_top, false, false); | ||
box.pack_start (content_grid); | ||
box.pack_start (window_handle_bottom, false, false); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should be add()
anyway, pack_start()
was removed/renamed in Gtk4, also child properties too, so it's better to keep using add() in this case.
|
||
add (window_handle); | ||
add (box); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add (box); | |
child = box; |
Fixes #52
I tried not to change the visual so the appearance of the dialog is completely the same.