-
Notifications
You must be signed in to change notification settings - Fork 730
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
QPushButton minimum size #194
Comments
This depends if we want to make this style follow the os or not. On macos the small buttons are in line with how the OS looks. |
Can you show a screenshot of the above code results with the macOS theme please? Edit: when I do a quick search for "macOS dialog" in Google, the results I get do not seem to indicate that the width of the dialog buttons are fitted to the content of the button... so that is strange. |
@goanpeca I agree that we are not forced to make the style follow the OS and that it is more a matter of taste than an actual bug. IMO, the width of the PushButton with the |
@jnsebgosselin In my opinion, it is a good idea to keep at least a minimum size for dialog buttons, but on the other side, I agree with @goanpeca. However, some checks are needed because I remember that I removed the min-width in some place because of some bug. I can check this. I'll mark to 2.9, so we can discuss more, and as @goanpeca said, we need to choose with we will follow the OS or not. |
Ok thanks. I'm still waiting for @goanpeca screenshot :P I do not have access to a mac, but from what I can see with a little google search, there seems to be a minimum width for the dialog buttons in macOS too.
I totally agree with the fact that we do not need to follow the OS here. I do believe however that the defaults used by the most popular OSes are the results of years of work by people that are specialized in UX and UI best practices. So I think that when we decide to diverge from the default behaviors set by these OSes, we need to think this over very carefully. In this particular case, I think that the tiny Just my two cents here. I'll be Ok with whatever is decided in the end :) |
My bad @jnsebgosselin There is indeed a minimum size on mac! |
I think we should use the values that Qt defines before we do any CSS patch. |
@goanpeca not sure if I understood your opinion, there are other places to set this min-width? Some links that can help us: |
I mean that we could query this minimum width values instead of hardcoding them? |
Describe Your Environment
Language
[Python]
Description / Steps to Reproduce [if necessary]
QPushButton
doesn't seem to have any minimum width value under the dark style theme and the minimum width of the buttons is derived instead based on the widget's contents with no regard to the lenght of the label. I think for very short labels likeOK
, this makes the button width too small.Please see this Stackoverflow post for a better explanation of this issue:
https://stackoverflow.com/questions/19385812/how-to-set-qpushbutton-stylesheet-affecting-buttons-size
Actual Result
Expected Results / Proposed Result
Relevant Code [if necessary]
The text was updated successfully, but these errors were encountered: