Skip to content

Conversation

@tpikonen
Copy link
Contributor

Allows the preferences dialog to be scaled to a width of about 480 px, of which ~180 px is given to the sidebar and the rest goes to the settings pages inside the Stack.

Sets most of the labels to be word-wrapped and splits label+widget combinations to separate lines, or uses FlowBox to do it adaptively. Also adds some vertical space between widgets to make touchscreen use easier.

Also increase bottom margin on the checkbox.
 * Enable word wrap in labels
 * Replace GtkGrid with two vertical GtkBoxes
 * Add bottom margins to checkbuttons as label wrapping space
 * preferences.py: Ellipsize device button label, replace deprecated
   set_alignment() with set_xalign()
 * Replace Grid with FlowBox in Video page
 * Don't set hexpand on ComboBoxes
 * preferences.py: Ellipsize video format selector combobox strings
@auouymous
Copy link
Member

Adding the following before the Gtk.Container branch in _wrap_checkbox_labels() will wrap the label inside buttons too.

            elif isinstance(w, Gtk.Button):
                for c in w.get_children():
                    if isinstance(c, Gtk.Label):
                        c.set_line_wrap(True)
                        return

The only problem, at least for me, is that the button doesn't resize until hover, causing the wrapped text to partially sit outside of the button. Hiding and showing the button didn't work. But if this could be made to work, we wouldn't need to add the label outside the "Upload local subscriptions" button.

@tpikonen
Copy link
Contributor Author

Adding the following before the Gtk.Container branch in _wrap_checkbox_labels() will wrap the label inside buttons too.

I'm not a fan of huge button labels, and would prefer to have the longer explanation in a label and a short action description in a button label as it is now in this PR.

@auouymous
Copy link
Member

The playlist folder on devices causes window to expand for long paths. Everything else looks good.

@tpikonen
Copy link
Contributor Author

Good catch, the label is now ellipsized.

@auouymous auouymous merged commit 961f0d7 into gpodder:master Apr 29, 2022
@auouymous
Copy link
Member

Thanks.

@tpikonen tpikonen deleted the narrow-prefs branch April 29, 2022 08:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants