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

QDockWidgets Titlebar have giant toolbars on Mac #128

Open
thomasaarholt opened this issue Apr 13, 2017 · 10 comments
Open

QDockWidgets Titlebar have giant toolbars on Mac #128

thomasaarholt opened this issue Apr 13, 2017 · 10 comments

Comments

@thomasaarholt
Copy link
Contributor

The Titlebar of the docked windows in the UI are very vertically wide on Mac. On Linux and Windows they look great.

screenshot 2017-04-13 19 00 15

@thomasaarholt
Copy link
Contributor Author

Undocked they look like this:
screenshot 2017-04-13 19 04 44

@vidartf
Copy link
Member

vidartf commented Apr 16, 2017

Could you try the style edit PR ( #133 ), and enter the following in the style editor:

QDockWidget::title {
    padding: 0px;  /* try varying this number */
}

The padding can also be 0px 5px for different padding horz/vert or 4 values for left/right/top/bottom (not sure about order).

@thomasaarholt
Copy link
Contributor Author

See comments to #133

@thomasaarholt
Copy link
Contributor Author

QDockWidget::title {
    padding: 10px;  /* try varying this number */
}

is the minimum padding size I can specify. Will try to play max/min.

@thomasaarholt
Copy link
Contributor Author

thomasaarholt commented Apr 20, 2017

padding: 20 works, without the px ending.
Padding seems to be dependent only on the first number, see example and comment below:

QDockWidget::title {
    padding: 10px 20px 30px 40px; /* All just 10*/
}

Edit:
On further testing, only padding-top has any effect, so it seems like all other paddings are "turned off". Negative values have no effect.

@vidartf
Copy link
Member

vidartf commented Apr 21, 2017

Does the other paddings work if you replace the icons?

@thomasaarholt
Copy link
Contributor Author

Will try tonight.

@thomasaarholt
Copy link
Contributor Author

Minimum example that is "acceptable" on my Mac:

QDockWidget::close-button, QDockWidget::float-button {
    icon-size: 15px;
    padding: 1px;
}

screenshot 2017-04-22 12 41 02

@thomasaarholt
Copy link
Contributor Author

Just to show, I can make it a lot more sexy for Mac as well:
screenshot 2017-04-22 12 51 07

@thomasaarholt
Copy link
Contributor Author

Making the button image change on hover is difficult (probably a bug), but there is a workaround:
http://stackoverflow.com/questions/32145080/qdockwidget-float-close-button-hover-images

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

No branches or pull requests

2 participants