busimus / cutelog

GUI for logging
MIT License
479 stars 45 forks source link

Ui resizing fixes #3

Closed luziferius closed 6 years ago

luziferius commented 6 years ago

This PR includes modifications to the Qt-Designer UI files to make stuff less rigid and more resizeable.

First 7 commits

The first commits only change ui files without touching any python code. Second commit fixes a small bug: The license text in the about dialog was not marked as read-only. I tried to keep the layout close to the original, while introducing resize-ability for the about window, the settings window, all settings window pages and the merge window. I replaced most of the stacked layout-widgets with single grid layouts.

Logger widget commit (8th)

The logger widget now shows a slightly different resizing-behaviour: The overview table containing the known log levels now non-greedily fills all available space. I widened the columns a bit, because I got text clipping on my system.

busimus commented 6 years ago

Damn, that's a lot, thank you for taking the time. Much of the change is good, but most of it I can't merge. There are just too many small things I don't like:

I'm not sure what the best course of action is right now. I don't think it makes sense to change this pull request to what I would like it to be. So I could either implement some these changes myself, or you could try again from scratch (but I can understand if you feel that it's a selfish suggestion).

I think the first option is the optimal one, as collaborating on the UI feels weird. And also, .ui files are in a slow process of being phased out in favor of writing UIs in code (and the merge dialog is the next one on the list). I don't want anyone wasting much effort on them in the meantime.

What are your thoughts?

luziferius commented 6 years ago

The bullet points:

For the other changes, I’ll edit the commits to not include the size changes (which will happen later).

About phasing out the UI files: What is the reasoning for this? Personally, I do prefer the declarative approach using ui files over implementing the UI in code.

Side note: You can use the pyuic5 standalone application to convert UI files into python code. If you have clean UI files, you get clean python code and spare complete re-implementation.

busimus commented 6 years ago

I can shrink the settings window up to a point where the largest page (the first) just fits in

Just fits in? Do you have the default font size set high or something like that? This is how it looks for me at its smallest horizontal size, lots of free space. Can you post a screenshot of how the settings window from the master branch looks for you? Because it's a lot smaller so it must be clipping too. After all this is done I'll write the code to save the settings window size (and increase the default size a bit).

About phasing out the UI files: What is the reasoning for this?

I am aware of pyuic5 and I look at what it generates sometimes. But I only use it as a reference because a clean re-implementation is better and not hard at my UI complexity level.

luziferius commented 6 years ago

Hmmm. OK. I do admit that I had not tested the UI without the last 2 (now dropped) commits. There is some strange, spurious space right to the option texts, but it looks like this: https://i.imgur.com/sHAii7j.png

After fiddling with the sizes a bit, I think it is OK now. I got the size down quite a bit. The screenshot above is slightly outdated.

busimus commented 6 years ago

Looks good. Thank you for your work!