Qirky/Troop

Client is not friendly to 768-pixel high laptop screens

Closed this issue · 3 comments

https://github.com/Qirky/Troop/blob/OT/src/interface/interface.py#L344

        h = 900

But many, many, many laptops are only 768 pixels high.

    def center(self):

        w = 1200
        h = 900

        ws = self.root.winfo_screenwidth()
        hs = self.root.winfo_screenheight()

        h = min(h, hs) - 100

        x = int((ws/2) - (w / 2))
        y = int((hs/2) - (h / 2))
        ... etc.

Now I can see the whole window.

Not sure of the ideal fix, but hardcoding a window size greater than winfo_screenheight() seems impolite.

Also, I see self.root.resizable(True, True) but I can't resize the window by dragging the edges... which is puzzling.

Qirky commented

Not sure why you can't resize the window - works on Windows, Mac, and Linux for me. What OS do you have? Presumably Linux as it's not starting fullscreen? I guess setting the backup dimensions was a bit of an oversight so I've changed it to 3/4 the screen size

I'm using Ubuntu Studio 18.04, which ships with XCFE 4.12 as the desktop environment.

Must be a bad interaction between the GUI layer and the window manager, then. When the mouse touches the edge of the window, it changes to the "drag-to-resize" icon (so I suppose from this that the window manager expects to be able to resize), but if I drag the window edge at this point, it moves the entire window without resizing.

Another data point -- XFCE windows have a "window" menu, accessible by clicking the top left. If I open this menu on a window that I know is resizable, there is an active "Resize" command. If I open this menu on the Troop window, "Resize" is grayed out. So it seems that the "resizable" property is not being set correctly in this environment (despite what the code says) -- or maybe Python is trying to set it, but the window manager isn't reading the property correctly.