[kfontinst] Port to use icons from the icon theme and make HiDPI aware
ClosedPublic

Authored by guoyunhe on Sep 11 2019, 9:01 AM.

Details

Summary

Use QIcon instead of QPixmap for icons. Use QPushButton for the filter menu instead of a QLabel.

Depends on D23942

Diff Detail

Repository
R119 Plasma Desktop
Branch
master
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 16634
Build 16652: arc lint + arc unit
guoyunhe created this revision.Sep 11 2019, 9:01 AM
Restricted Application added a project: Plasma. · View Herald TranscriptSep 11 2019, 9:01 AM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
guoyunhe requested review of this revision.Sep 11 2019, 9:01 AM
guoyunhe edited the summary of this revision. (Show Details)Sep 11 2019, 9:01 AM
guoyunhe added a reviewer: Plasma.
guoyunhe updated this revision to Diff 65841.EditedSep 11 2019, 10:15 AM

Fix the font preview size in HiDPI

guoyunhe updated this revision to Diff 66074.Sep 14 2019, 5:43 PM

Change icon name. To match patch D23942

ngraham retitled this revision from kfontinst HiDPI icons to [kfontinst] Port to use icons from the icon theme.Sep 14 2019, 7:37 PM
ngraham edited the summary of this revision. (Show Details)
ngraham retitled this revision from [kfontinst] Port to use icons from the icon theme to [kfontinst] Port to use icons from the icon theme and make HiDPI aware.
ngraham requested changes to this revision.Sep 14 2019, 7:50 PM
ngraham added a subscriber: ngraham.

Either use a ToolButton for the filter feature, or turn "Scan for duplicate fonts" into a PushButton, so they match one way or another.

This revision now requires changes to proceed.Sep 14 2019, 7:50 PM

I changed it to QToolButton, but it still look different:

guoyunhe updated this revision to Diff 66101.EditedSep 15 2019, 6:28 AM

Unify button look

Maybe in the interests of Goal: Consistency, let's make the filter feature look the same way that it does in the Colors KCM:

Maybe in the interests of Goal: Consistency, let's make the filter feature look the same way that it does in the Colors KCM:

There is a major difference: the color filter is a combobox but the font filter is a menu with checkbox and child menu. I cannot change it to a combobox but can swap the order and try to add borders.

Maybe in the interests of Goal: Consistency, let's make the filter feature look the same way that it does in the Colors KCM:

There is a major difference: the color filter is a combobox but the font filter is a menu with checkbox and child menu. I cannot change it to a combobox but can swap the order and try to add borders.

Radio buttons, not checkboxes. Which means the entries are all mutually exclusive, which means it could actually be a combobox, but for the fact that some of its items have sub-menus.

Now I can get something like this (the QLineEdit and QPushButton still have different height):

Now I can get something like this (the QLineEdit and QPushButton still have different height):

That's better, and we should just fix https://bugs.kde.org/show_bug.cgi?id=411811

guoyunhe updated this revision to Diff 66157.EditedSep 15 2019, 8:49 PM

Similar filter layout as Colors KCM. Move "Scan Duplicates..." button to the bottom button group.

Also improved spacing in filter bar.

ngraham requested changes to this revision.Sep 15 2019, 9:08 PM

Uh-oh, moving the button down to the lower row now causes the layout to get so wide with English that it overflows the default System Settings window size:

.

This revision now requires changes to proceed.Sep 15 2019, 9:08 PM
guoyunhe updated this revision to Diff 66191.EditedSep 16 2019, 7:47 AM

Avoid scrollbar. Put progressbar and font status to another row.

Some weird layout when increase the height to very big:

guoyunhe updated this revision to Diff 66193.EditedSep 16 2019, 8:22 AM

Fix size policy

Rename Scan Duplicates... to Find Duplicates... and move the button to the left of Install from File... and then I think this will be good.

guoyunhe updated this revision to Diff 66229.EditedSep 16 2019, 2:38 PM

Rename and move the find duplicate button

ngraham accepted this revision.Sep 16 2019, 2:52 PM

LGTM!

This revision is now accepted and ready to land.Sep 16 2019, 2:52 PM
This revision was automatically updated to reflect the committed changes.