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

Use system-consistent icon sizing. #65

Closed
RokeJulianLockhart opened this issue Oct 17, 2023 · 9 comments
Closed

Use system-consistent icon sizing. #65

RokeJulianLockhart opened this issue Oct 17, 2023 · 9 comments
Assignees
Labels
duplicate This issue or pull request already exists

Comments

@RokeJulianLockhart
Copy link

RokeJulianLockhart commented Oct 17, 2023

The current iconography is unnecessarily large:

Screenshot_20231017_190229

See https://discuss.kde.org/t/qml-python3-how-to-read-icons-kcm-configured-sizes/1209/7?u=rokejulianlockhart

@digitaltrails
Copy link
Owner

@digitaltrails
Copy link
Owner

In #63 I added a setting to try and help adjust icons appropriately according to DPI. However, I've never be sure if what I've done is the right approach.

It now occurs to me that the choice of icon sizes might be more accurately determined by interrogating the default font size in use.

I've had to play similar games in the past. To detect a dark/light theme I create some text in a QLabel and test the relationship between the text and background colors. In this instance could extract a QLabel's font size (in a relevant metric) and base icon sizes around that.

@RokeJulianLockhart
Copy link
Author

RokeJulianLockhart commented Oct 17, 2023

Does it involve a High DPI desktop or a normal one?

@digitaltrails, https://www.infobyip.com/detectmonitordpi.php states 96×96 DPI. I use a 1440p monitor.

#65 (comment)

"After" at #63 (comment) is (more like) what I expected.

@digitaltrails
Copy link
Owner

In the settings dialog, try turning off the adjust for dpi setting (it will prompt to restart the app).

I think the following code might be returning True:

def is_high_dpi() -> bool:
    return adjust_for_dpi and QApplication.primaryScreen().physicalDotsPerInch() >= 160

I'll have to add some logging to see for sure.

@RokeJulianLockhart
Copy link
Author

RokeJulianLockhart commented Oct 17, 2023

In the settings dialog, try turning off the adjust for dpi setting

I've not been able to locate it, @digitaltrails. Could you screenshot the window you refer to?

@digitaltrails
Copy link
Owner

image

@RokeJulianLockhart
Copy link
Author

RokeJulianLockhart commented Oct 17, 2023

@digitaltrails, mine is different – that option is absent.

Screenshot_20231017_224145

@digitaltrails
Copy link
Owner

Oh, it's a new option in v.12.0, you'd need to probably download the vdu_controls.py from github and replace the version you're using - or wait for the distribution to catch up.

I thought I'd released in in v1.11, but no v1.12 only got released yesterday.

@digitaltrails digitaltrails self-assigned this Oct 19, 2023
@digitaltrails digitaltrails added the duplicate This issue or pull request already exists label Oct 19, 2023
@digitaltrails
Copy link
Owner

Duplicate of #63 - see further info there.

@digitaltrails digitaltrails closed this as not planned Won't fix, can't repro, duplicate, stale Oct 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants