Re: System tray icon sizes

2014-09-22 Thread Marco Martin
On Sunday 21 September 2014, Andrew Lake wrote:
 On Sun, Sep 21, 2014 at 2:06 AM, Marco Martin  wrote:
  Btw, since we are refining systray icons, do they work also on a size of
  22x22(if not I'll fix the code)? I would love to get rid of the old hack
  of 24x24, that is just a remnant of the xembed legacy icons
 
 I changed the padding rect on klipper and the battery icons to 22x22 with
 the same 16x16 icon size in both. The result is here:
 
 http://wstaw.org/m/2014/09/21/5.1_scaling_bug_C.png

ok, it seems fine, the battery needs ficing but we knew that

 
 The klipper icon seems to render fine. The battery icon scales up.
 
 With the fixes in-place or expected to be in-place, is it ok if I target a
 22x22 padding rect for all icons?

yes

-- 
Marco Martin
___
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel


Re: System tray icon sizes

2014-09-22 Thread Marco Martin
On Sunday 21 September 2014, Kai Uwe Broulik wrote:
  Btw, since we are refining systray icons, do they work also on a size of
  22x22(if not I'll fix the code)? I would love to get rid of the old hack
  of 24x24, that is just a remnant of the xembed legacy icons
 
 Is that the reason why even if I use units.roundToIconSize on the
 batterymonitor the icon still resizes at different thresholds?

yes, probably. IconItem has a case for both 22x22 and 24x24, as a workaround 
on the fact most icons used to be 24.
i can either add it to units as well, or just remove it (should probably use 
the same function to round as well)

-- 
Marco Martin
___
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel


Re: System tray icon sizes

2014-09-21 Thread Andrew Lake
I'm running into a little bit of the inconsistency in systray icon sizes as
we're working to try to improve the systray icons.

http://wstaw.org/m/2014/09/21/5.1_systray_scaling_bug.png

The icons are still a WIP so please ignore that for the moment. All the
icons are 16x16 sitting on a padding rect in the svg. The only way I can
get all the icons to properly render at 16x16 is to use a 32x32 padding
rect for the example battery icon and a 24x24 padding rect for the klipper
icon (the first screenshot). If I put them both on a 24x24 rectangle the
battery icon appears to get scaled up resulting in both a bigger icon, and
the icon no longer aligned to the pixel grid resulting in bluriness (the
second screenshot) for the battery icon but a sharp klipper icon. The other
downside is that with such a big padding rect for the battery icon, where
it is used elsewhere the icon is really small.

The same thing happens with the network icons as the battery icons.

I'm not sure how to tell how the icon will be used, so I'm not what rule to
follow to ensure the icon sizes are rendered consistently.

I was going to file a bug, but I wasn't sure so I thought I'd chime in here.

Hope this helps,
Andrew

On Mon, Sep 15, 2014 at 12:56 AM, Marco Martin notm...@gmail.com wrote:

 On Friday 12 September 2014, Kai Uwe Broulik wrote:
  Hi,
 
  One of the problems is that most of the tray icons use a Plasma IconItem
  which follows the icon sizes (16, 22, 32, 48, ...) whereas a custom item
  does not.
 
  This is also the reason why battery and network usually appear in a
  different size since they're using SvgItem which doesn't have this magic.
 
  Imho that needs fixing in systray.

 I'm not sure that can be fixed in the systray, because it's still important
 for the clickable area to reach the screen edge(fitts law and all that
 jazz),
 so the actual item size should still touch the containment edges.

 and is the same thing for applets just in the panel, you would have the
 same
 problem, so in order to retain flexibility custom compactrepresentation
 items
 should still compute their size...

 What about a function
 units.roundToIconSize(size)  ?

 would still be manual, but very quick to do

 MouseArea {
 //the rootitem that goes to the edget

 Item {
 //whatever is graphics goes here
 width: units.roundToIconSize(parent.width)
 height: width
 anchors.centerIn: parent
 }

 }

 --
 Marco Martin
 ___
 Plasma-devel mailing list
 Plasma-devel@kde.org
 https://mail.kde.org/mailman/listinfo/plasma-devel

___
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel


Re: System tray icon sizes

2014-09-21 Thread Andrew Lake
Correction: it's a 30x30 padding rect that gets the icon sizes the same,
not a 32x32 padding rect.

Hope this helps,
Andrew

On Sun, Sep 21, 2014 at 1:17 AM, Andrew Lake wrote:

 I'm running into a little bit of the inconsistency in systray icon sizes
 as we're working to try to improve the systray icons.

 http://wstaw.org/m/2014/09/21/5.1_systray_scaling_bug.png

 The icons are still a WIP so please ignore that for the moment. All the
 icons are 16x16 sitting on a padding rect in the svg. The only way I can
 get all the icons to properly render at 16x16 is to use a 32x32 padding
 rect for the example battery icon and a 24x24 padding rect for the klipper
 icon (the first screenshot). If I put them both on a 24x24 rectangle the
 battery icon appears to get scaled up resulting in both a bigger icon, and
 the icon no longer aligned to the pixel grid resulting in bluriness (the
 second screenshot) for the battery icon but a sharp klipper icon. The other
 downside is that with such a big padding rect for the battery icon, where
 it is used elsewhere the icon is really small.

 The same thing happens with the network icons as the battery icons.

 I'm not sure how to tell how the icon will be used, so I'm not what rule
 to follow to ensure the icon sizes are rendered consistently.

 I was going to file a bug, but I wasn't sure so I thought I'd chime in
 here.

 Hope this helps,
 Andrew

 On Mon, Sep 15, 2014 at 12:56 AM, Marco Martin notm...@gmail.com wrote:

 On Friday 12 September 2014, Kai Uwe Broulik wrote:
  Hi,
 
  One of the problems is that most of the tray icons use a Plasma IconItem
  which follows the icon sizes (16, 22, 32, 48, ...) whereas a custom item
  does not.
 
  This is also the reason why battery and network usually appear in a
  different size since they're using SvgItem which doesn't have this
 magic.
 
  Imho that needs fixing in systray.

 I'm not sure that can be fixed in the systray, because it's still
 important
 for the clickable area to reach the screen edge(fitts law and all that
 jazz),
 so the actual item size should still touch the containment edges.

 and is the same thing for applets just in the panel, you would have the
 same
 problem, so in order to retain flexibility custom compactrepresentation
 items
 should still compute their size...

 What about a function
 units.roundToIconSize(size)  ?

 would still be manual, but very quick to do

 MouseArea {
 //the rootitem that goes to the edget

 Item {
 //whatever is graphics goes here
 width: units.roundToIconSize(parent.width)
 height: width
 anchors.centerIn: parent
 }

 }

 --
 Marco Martin
 ___
 Plasma-devel mailing list
 Plasma-devel@kde.org
 https://mail.kde.org/mailman/listinfo/plasma-devel



___
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel


Re: System tray icon sizes

2014-09-21 Thread Marco Martin
On Sep 21, 2014 10:39 AM, Andrew Lake jamboar...@gmail.com wrote:

 Correction: it's a 30x30 padding rect that gets the icon sizes the same,
not a 32x32 padding rect.

The battery (and possibly metworkmanager) were known for being a bit too
big. I have now added api to make it possible to compute the correct size,
so tjey should be fixed in madter shortly.

Btw, since we are refining systray icons, do they work also on a size of
22x22(if not I'll fix the code)? I would love to get rid of the old hack of
24x24, that is just a remnant of the xembed legacy icons

--
Marco Martin
___
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel


Re: System tray icon sizes

2014-09-21 Thread Eike Hein
Tangentially related: The icons aren't horizontally centered in a vertical 
panel.

Cheers,
Eike
___
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel


Re: System tray icon sizes

2014-09-21 Thread Kai Uwe Broulik

 Btw, since we are refining systray icons, do they work also on a size of 
 22x22(if not I'll fix the code)? I would love to get rid of the old hack of 
 24x24, that is just a remnant of the xembed legacy icons

Is that the reason why even if I use units.roundToIconSize on the 
batterymonitor the icon still resizes at different thresholds?
___
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel


Re: System tray icon sizes

2014-09-21 Thread Andrew Lake
On Sun, Sep 21, 2014 at 2:06 AM, Marco Martin  wrote:

 Btw, since we are refining systray icons, do they work also on a size of
 22x22(if not I'll fix the code)? I would love to get rid of the old hack of
 24x24, that is just a remnant of the xembed legacy icons


I changed the padding rect on klipper and the battery icons to 22x22 with
the same 16x16 icon size in both. The result is here:

http://wstaw.org/m/2014/09/21/5.1_scaling_bug_C.png

The klipper icon seems to render fine. The battery icon scales up.

With the fixes in-place or expected to be in-place, is it ok if I target a
22x22 padding rect for all icons?

Thanks for all your help!
Andrew
___
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel


Re: System tray icon sizes

2014-09-21 Thread David Edmundson
​Padding inside the SVG?
___
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel


Re: System tray icon sizes

2014-09-21 Thread Andrew Lake
On Sep 21, 2014 3:47 PM, David Edmundson wrote:

 ​Padding inside the SVG?

Yes
___
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel


Re: System tray icon sizes

2014-09-21 Thread David Edmundson
 ​Padding inside the SVG?

Yes

I don't think this is the right long-term approach. We end up with problems
like in the original post where it's difficult to make another item line up
with an icon.

IMHO padding should be applied at a QML level, not inside the component. It
makes the behaviour a bit different to everything else.

David
___
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel


Re: System tray icon sizes

2014-09-21 Thread Andrew Lake
On Sun, Sep 21, 2014 at 5:39 PM, David Edmundson wrote:

  ​Padding inside the SVG?

 Yes

 I don't think this is the right long-term approach. We end up with
 problems like in the original post where it's difficult to make another
 item line up with an icon.

 IMHO padding should be applied at a QML level, not inside the component.
 It makes the behaviour a bit different to everything else.

 David

Sorry David, I wasn't terribly clear. I'm not advocating padding in the
asset as the correct way to handle padding. I was actually asking if I
should target the icon asset in the plasma theme icon svgs to a source size
of 22x22 instead of the varying sizes right now that appears to be
necessary to achieve consistent scaling and pixel grid alignment in the
systray. (For the specific icons I'm working on they *happen* to have some
padding in the asset relative to the visible portions of the asset, but
only as required to match the corresponding icons in the main icon theme.)

Sorry for the confusion. :-(
Andrew
___
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel


Re: System tray icon sizes

2014-09-15 Thread Marco Martin
On Friday 12 September 2014, Kai Uwe Broulik wrote:
 Hi,
 
 One of the problems is that most of the tray icons use a Plasma IconItem
 which follows the icon sizes (16, 22, 32, 48, ...) whereas a custom item
 does not.
 
 This is also the reason why battery and network usually appear in a
 different size since they're using SvgItem which doesn't have this magic.
 
 Imho that needs fixing in systray.

I'm not sure that can be fixed in the systray, because it's still important 
for the clickable area to reach the screen edge(fitts law and all that jazz), 
so the actual item size should still touch the containment edges.

and is the same thing for applets just in the panel, you would have the same 
problem, so in order to retain flexibility custom compactrepresentation items 
should still compute their size...

What about a function
units.roundToIconSize(size)  ?

would still be manual, but very quick to do

MouseArea {
//the rootitem that goes to the edget

Item {
//whatever is graphics goes here
width: units.roundToIconSize(parent.width)
height: width
anchors.centerIn: parent
}

}

-- 
Marco Martin
___
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel


System tray icon sizes

2014-09-12 Thread Martin Yrjölä
Hi!

I'm developing the keyboard layout switcher plasmoid but can't match
the other system tray icon sizes. The plasmoid is a rounded rectangle
with text inside. If I use anchors.fill: parent I get something like
the picture in [1]. If i use a multiplier of 0.7 I get it to line up
nicely in bigger sizes, but in small panels my plasmoid becomes
smaller than the other system tray icons. The QML-source is listed in
[2].

[1] http://i.imgur.com/gluYf3A.png
[2] http://paste.kde.org/p0lrzhopv

Best regards,
Martin Yrjölä
___
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel


Re: System tray icon sizes

2014-09-12 Thread Kai Uwe Broulik
Hi,

One of the problems is that most of the tray icons use a Plasma IconItem which 
follows the icon sizes (16, 22, 32, 48, ...) whereas a custom item does not.

This is also the reason why battery and network usually appear in a different 
size since they're using SvgItem which doesn't have this magic.

Imho that needs fixing in systray.

Cheers,
Kai Uwe

Am 12.09.2014 14:08 schrieb =?ISO-8859-1?Q?Martin_Yrj=F6l=E4?= 
martin.yrj...@gmail.com:

 Hi!

 I'm developing the keyboard layout switcher plasmoid but can't match
 the other system tray icon sizes. The plasmoid is a rounded rectangle
 with text inside. If I use anchors.fill: parent I get something like
 the picture in [1]. If i use a multiplier of 0.7 I get it to line up
 nicely in bigger sizes, but in small panels my plasmoid becomes
 smaller than the other system tray icons. The QML-source is listed in
 [2].

 [1] http://i.imgur.com/gluYf3A.png
 [2] http://paste.kde.org/p0lrzhopv

 Best regards,
 Martin Yrjölä
 ___
 Plasma-devel mailing list
 Plasma-devel@kde.org
 https://mail.kde.org/mailman/listinfo/plasma-devel
___
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel


Re: System tray icon sizes

2014-09-12 Thread Martin Yrjölä
On Fri, Sep 12, 2014 at 3:23 PM, Kai Uwe Broulik k...@privat.broulik.de wrote:
 Hi,

 One of the problems is that most of the tray icons use a Plasma IconItem 
 which follows the icon sizes (16, 22, 32, 48, ...) whereas a custom item does 
 not.

 This is also the reason why battery and network usually appear in a different 
 size since they're using SvgItem which doesn't have this magic.

 Imho that needs fixing in systray.

Thanks for the explanation! I also think this should be fixed in the
systray. Could it wrap every item inside a QML-component that resizes
itself according to the icon sizes like IconItem does? I still have to
look closer on the implementation to know how the system tray works. I
made a bug report for this issue [1].

Cheers,
Martin

[1] https://bugs.kde.org/show_bug.cgi?id=339033
___
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel