Provide icons for 2x scaling
ClosedPublic

Authored by rizzitello on Sep 2 2018, 2:29 AM.

Details

Summary

Simlink the following
16 -> 16@2x
22 -> 22@2x
actions/24 ->24@2x
actions/32 ->32@2x

See D6313

Diff Detail

Repository
R266 Breeze Icons
Branch
16@2x
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 2472
Build 2490: arc lint + arc unit
rizzitello created this revision.Sep 2 2018, 2:29 AM
Restricted Application added a project: Frameworks. · View Herald TranscriptSep 2 2018, 2:29 AM
Restricted Application added a subscriber: kde-frameworks-devel. · View Herald Transcript
rizzitello requested review of this revision.Sep 2 2018, 2:29 AM
rizzitello retitled this revision from link 16 to 16@2 to Link 16px icon folders to 16@2.Sep 2 2018, 2:31 AM
rizzitello added reviewers: VDG, Plasma.
broulik added a subscriber: broulik.Sep 2 2018, 4:45 PM

I think the suffix should be @2x, not just @2. Also, I don't think it's neccessary for the animation folder.
Anyway, without the ScalableIcons entry in index.theme testing this is difficult

I think the suffix should be @2x, not just @2. Also, I don't think it's neccessary for the animation folder.
Anyway, without the ScalableIcons entry in index.theme testing this is difficult

That would be easy to change, I didn't add to the index.theme because i was not sure what i needed to add . If someone could advise me i will update that when i change the link to '16@2x'

Should I be doing this for all the size folders or just 16? what about emblems where i think 8 is our small size?

About the index.theme, what you want to do is, for every folder duplicate the non-2x entry and add a Scale=2 to it, e.g.

[places/16]
Size=16
Context=Places
Type=Fixed

add after it

[places/16@2x]
Size=16
Scale=2
Context=Places
Type=Fixed

and also add all the new directories to a ScaledDirectories key, below Directories (it is a separate key so that applications not supporting this don't get confused by the new scaled directories)

rizzitello updated this revision to Diff 40934.Sep 3 2018, 8:29 PM
  • 16@2x icons
  • icon.theme updated
rizzitello updated this revision to Diff 40941.Sep 3 2018, 8:59 PM
  • Add 22@2x links
rizzitello updated this revision to Diff 40942.Sep 3 2018, 9:23 PM
  • Link 24 to 24@2x
  • Link actions/32 to actions/32@2x

Thanks a lot!

There's a quirk in Dolphin where it wouldn't pick up the 22px places icons as in KStandardItemListWidget::pixmapForIcon it scales the size (22→44) first and then clamps it to an icon size (48) and so it won't find the fixed 22. Also, the problem of highlighted files turning white. I'd like to investigate those two issues before we merge this. Your patch looks good, however! :)

rizzitello retitled this revision from Link 16px icon folders to 16@2 to Provide icons for 2x scaling.Sep 4 2018, 12:29 AM
rizzitello edited the summary of this revision. (Show Details)
broulik accepted this revision.Sep 5 2018, 10:25 AM

Alright, Dolphin patches merged to stable. This can go in now, thanks!

This revision is now accepted and ready to land.Sep 5 2018, 10:25 AM
ngraham accepted this revision.Sep 6 2018, 3:05 AM
ngraham added a subscriber: ngraham.

So if I apply this patch, use a 2x scale factor, and launch Dolphin (from 18.08.2 or git master), I should see all line-art icons in my places panel, right? It works for 2x, and 1.5x, but at 1.7x and 1.3x I hit https://bugs.kde.org/show_bug.cgi?id=396990. But that's not your fault, so... approved!

Does this mean that every new 16px, 22px, 24px, and 32px monochrome icon will need an @2x symlink?

rizzitello added a comment.EditedSep 6 2018, 10:52 AM

Does this mean that every new 16px, 22px, 24px, and 32px monochrome icon will need an @2x symlink?

There will be no need for that since I have simlinked the directories using ln -sdr so 16@2x is a simlink to 16. No icons links were created.

Fantastic, shipit!

acrouthamel added a subscriber: acrouthamel.

I love all of these HIDPI fixes lately.

cfeck added a subscriber: cfeck.Sep 13 2018, 3:30 AM

Did this fix bug 398094?

Hah, yes it did!