Skip to content
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

Prefs window slightly too short for contents #10

Closed
ferdnyc opened this issue Nov 30, 2017 · 2 comments
Closed

Prefs window slightly too short for contents #10

ferdnyc opened this issue Nov 30, 2017 · 2 comments
Labels
enhancement A request for a feature or additional functionality

Comments

@ferdnyc
Copy link
Member

ferdnyc commented Nov 30, 2017

This is admittedly the least critical thing in the world, and I feel almost silly opening an Issue for it, but...

The GSConnect preferences window, at least on my system, is coming up just slightly too short to comfortably hold its contents. This is visible on the About pane, where the bottom of the Debug switch's box is cut off:
screenshot from 2017-11-30 13-01-47
and slightly more so on the Preferences pane, where you have to scroll to see the description of the Nautilus Integration switch:
screenshot from 2017-11-30 13-03-25
The local device entry in the Devices pane also scrolls, though in that case there's nothing but empty space below. The remote device entries all scroll, of course, because their Plugins lists make them much longer.

I couldn't find anywhere in the code where the height of the window was actually set (though I didn't look too hard), but if Shell is sizing it automagically then it's not doing a very good job. Perhaps it was rushed.

"You rush a miracle man, you get rotten miracles!" –Miracle Max, The Princess Bride

@andyholmes
Copy link
Collaborator

To be honest I'm not sure where the window size comes from and accessing the preferences window itself requires a bit of hack so I never bothered to change it. Basically you return a GtkWidget for your preferences, then the window is instantiated and finally the widget is added to the window. So in order to do anything to the window you have to do something like this in buildPrefsWidget():

Mainloop.timeout_add(0, () => {
    let prefsWindow = myPrefsWidget.get_toplevel();
    prefsWindow.default_height = 640;
    return false;
});

basically waiting for the window to enter the main loop, then modifying it real quick like before anyone notices. Honestly I'm surprised the extension reviewers let me get away with that when I added the switcher buttons to the headerbar.

The simpler way would probably be to disable scrolling on the pages to force the window to expand, however all the pages inherit from the same base class (modelled after the Gnome Control Center UI) and disabling scrolling on all of them could result in a window that doesn't fit on the screen. Since the About Page isn't likely to ever change, I've disabled vertical scrolling on that (now), but I'm not sure about any of the others, since there's probably more settings to come.

@andyholmes andyholmes added the enhancement A request for a feature or additional functionality label Nov 30, 2017
@andyholmes
Copy link
Collaborator

Marking this one closed as well, since the about page has been fixed, and the other pages need to scroll.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement A request for a feature or additional functionality
Projects
None yet
Development

No branches or pull requests

2 participants