Discussion:
[LyX/master] Cmake buid: Install the new svgz icons
Jürgen Spitzmüller
2014-10-18 15:15:29 UTC
Permalink
commit 110f39482e9ae7266695807481ead60e0fabc8dd
Date: Sat Oct 18 16:53:41 2014 +0200
Cmake buid: Install the new svgz icons
Note that they are not yet used. I don't think we need to install them now.

Jürgen
Kornel Benko
2014-10-18 15:21:43 UTC
Permalink
Post by Jürgen Spitzmüller
commit 110f39482e9ae7266695807481ead60e0fabc8dd
Date: Sat Oct 18 16:53:41 2014 +0200
Cmake buid: Install the new svgz icons
Note that they are not yet used. I don't think we need to install them now.
JÃŒrgen
I was wandering, why they are not installed. Does it harm? I like to be prepared.

Kornel
Jürgen Spitzmüller
2014-10-18 15:36:50 UTC
Permalink
Post by Kornel Benko
I was wandering, why they are not installed. Does it harm? I like to be prepared.
It's only a size issue (> 4 MB). I suppose if we switch to them, we will
remove the bitmap icons and probably move the SVG icons to the top level
images folder-

Jürgen
Kornel Benko
2014-10-18 17:29:44 UTC
Permalink
Post by Jürgen Spitzmüller
Post by Kornel Benko
I was wandering, why they are not installed. Does it harm? I like to be prepared.
It's only a size issue (> 4 MB). I suppose if we switch to them, we will
remove the bitmap icons and probably move the SVG icons to the top level
images folder-
I Opt for the current image/svg folder. We may as well move the .png images to image/png/math etc.

Since it is not decided, where the images should stay, I probably should revert.
Post by Jürgen Spitzmüller
JÃŒrgen
Kornel
Stephan Witt
2014-10-22 08:20:50 UTC
Permalink
Post by Jürgen Spitzmüller
Post by Kornel Benko
I was wandering, why they are not installed. Does it harm? I like to be prepared.
It's only a size issue (> 4 MB). I suppose if we switch to them, we will
remove the bitmap icons and probably move the SVG icons to the top level
images folder-
Do you have a plan/idea how they should be used by LyX at run-time?

Stephan
Jürgen Spitzmüller
2014-10-22 08:37:44 UTC
Permalink
Post by Stephan Witt
Do you have a plan/idea how they should be used by LyX at run-time?
I have not checked, but I guess it is just a matter of replacing

setIcon(QIcon(getPixmap(imagedir, name, "png")))

by something like

setIcon(QIcon(getPixmap(fname.absFileName())

in MenuButton::MenuButton

and something similar for the math and IPA panels.

The scaling should be handled by Qt.

JÃŒrgen
Post by Stephan Witt
Stephan
Jürgen Spitzmüller
2014-10-22 08:38:46 UTC
Permalink
Post by Jürgen Spitzmüller
setIcon(QIcon(getPixmap(imagedir, name, "png")))
by something like
setIcon(QIcon(getPixmap(fname.absFileName())
that is:

setIcon(QIcon(fname.absFileName()))

JÃŒrgen
Stephan Witt
2014-10-22 08:55:42 UTC
Permalink
Post by Stephan Witt
Do you have a plan/idea how they should be used by LyX at run-time?
I have not checked, but I guess it is just a matter of replacing
setIcon(QIcon(getPixmap(imagedir, name, "png")))
by something like
setIcon(QIcon(fname.absFileName()))
in MenuButton::MenuButton
and something similar for the math and IPA panels.
The scaling should be handled by Qt.
Ok, I'll try that. But I think that's not enough.
I saw some code already using the actual icon size to
determine the size of the buttons. I'd guess this will
not work with SVG files.

Stephan
Jürgen Spitzmüller
2014-10-22 09:18:07 UTC
Permalink
Post by Stephan Witt
Ok, I'll try that. But I think that's not enough.
I saw some code already using the actual icon size to
determine the size of the buttons. I'd guess this will
not work with SVG files.
I do not think we will need such extra code. We just can tell Qt to scale
the SVG images to a given icon size.

JÃŒrgen
Post by Stephan Witt
Stephan
Stephan Witt
2014-10-22 09:28:03 UTC
Permalink
Post by Stephan Witt
Ok, I'll try that. But I think that's not enough.
I saw some code already using the actual icon size to
determine the size of the buttons. I'd guess this will
not work with SVG files.
I do not think we will need such extra code. We just can tell Qt to scale the SVG images to a given icon size.
Yes, but the size to give for the icons currently is determined from the icon size, IMO.

We have to change that to make the decision what size should be used
either automatic guessed by display size or depending on desktop settings
or configureable by user. But I should look at the source code first…

Stephan
Stephan Witt
2014-10-22 09:47:07 UTC
Permalink
Post by Stephan Witt
Post by Stephan Witt
Ok, I'll try that. But I think that's not enough.
I saw some code already using the actual icon size to
determine the size of the buttons. I'd guess this will
not work with SVG files.
I do not think we will need such extra code. We just can tell Qt to scale the SVG images to a given icon size.
Yes, but the size to give for the icons currently is determined from the icon size, IMO.
We have to change that to make the decision what size should be used
either automatic guessed by display size or depending on desktop settings
or configureable by user. But I should look at the source code first…
I'm referring to the GuiViewPrivate constructor.

The normal size for icons is set to 20 or the size of iconsize.png if present.
But it's limited to the range of 16..26 - regardless of the current screen size.
For Mac retina displays this is ok. Here the size is the device-independent size.
For Windows with high resolution display this is the reason for much too small icons.

Stephan
Jürgen Spitzmüller
2014-10-22 10:00:11 UTC
Permalink
Post by Stephan Witt
Post by Stephan Witt
We have to change that to make the decision what size should be used
either automatic guessed by display size or depending on desktop settings
or configureable by user. But I should look at the source code first

I'm referring to the GuiViewPrivate constructor.
The normal size for icons is set to 20 or the size of iconsize.png if present.
But it's limited to the range of 16..26 - regardless of the current screen size.
For Mac retina displays this is ok. Here the size is the
device-independent size.
For Windows with high resolution display this is the reason for much too small icons.
I think we should use the desktop/system settings by default, if possible
and allow for size adjustment via the toolbar context menu.

JÃŒrgen
Post by Stephan Witt
Stephan
Stephan Witt
2014-10-22 10:36:55 UTC
Permalink
Post by Stephan Witt
Post by Stephan Witt
We have to change that to make the decision what size should be used
either automatic guessed by display size or depending on desktop settings
or configureable by user. But I should look at the source code first…
I'm referring to the GuiViewPrivate constructor.
The normal size for icons is set to 20 or the size of iconsize.png if present.
But it's limited to the range of 16..26 - regardless of the current screen size.
For Mac retina displays this is ok. Here the size is the device-independent size.
For Windows with high resolution display this is the reason for much too small icons.
I think we should use the desktop/system settings by default, if possible and allow for size adjustment via the toolbar context menu.
Ok.

It looks like Qt5 doesn't support linear gradients.

Console output is: "Could not resolve property : linearGradient5167" or similar.

My version of ImageMagick has the same or a similar problem:

$ convert update-others.svg -size 40x40 lyx/lib/images/update-***@2x.png
convert: unrecognized color `radialGradient3422' @ warning/color.c/GetColorCompliance/1046.
convert: unable to open image `radialGradient3422': No such file or directory @ error/blob.c/OpenBlob/2709.
convert: no decode delegate for this image format `' @ error/constitute.c/ReadImage/501.
convert: non-conforming drawing primitive definition `fill' @ error/draw.c/DrawImage/3192.
$

Stephan
Jürgen Spitzmüller
2014-10-22 11:11:57 UTC
Permalink
Post by Stephan Witt
Ok.
It looks like Qt5 doesn't support linear gradients.
Console output is: "Could not resolve property : linearGradient5167" or similar.
warning/color.c/GetColorCompliance/1046.
convert: unable to open image `radialGradient3422': No such file or
error/constitute.c/ReadImage/501.
error/draw.c/DrawImage/3192.
$
Does it only concern some files?

JÃŒrgen
Post by Stephan Witt
Stephan
Stephan Witt
2014-10-22 11:32:57 UTC
Permalink
Post by Jürgen Spitzmüller
Post by Stephan Witt
Ok.
It looks like Qt5 doesn't support linear gradients.
Console output is: "Could not resolve property : linearGradient5167" or similar.
$
Does it only concern some files?
In svg/oxygen we have 165 files containing radialGradient, 179 without it.
E.g. with view-split_vertical.svgz convert doesn't complain and creates a valid png file.

Stephan
Jürgen Spitzmüller
2014-10-22 11:41:42 UTC
Permalink
Post by Stephan Witt
In svg/oxygen we have 165 files containing radialGradient, 179 without it.
I am rather surprised that so many files should cause problems, since most
are simply copied from the official oxygen icon set and thus heavily used
and tested within KDE.

JÃŒrgen
Stephan Witt
2014-10-22 11:53:44 UTC
Permalink
Post by Stephan Witt
In svg/oxygen we have 165 files containing radialGradient, 179 without it.
I am rather surprised that so many files should cause problems, since most are simply copied from the official oxygen icon set and thus heavily used and tested within KDE.
1. I don't know what Qt version is used by KDE - Qt4 I presume.
2. Qt5 spits a warning message only.
(Regarding linearGradient in my example, but I guess it's the same with radialGradient. Not tested.)

Convert is more picky and raises an error. Perhaps this is fixed in more recent versions.

Stephan
Jürgen Spitzmüller
2014-10-22 12:18:31 UTC
Permalink
Post by Stephan Witt
1. I don't know what Qt version is used by KDE - Qt4 I presume.
KDE 4 uses Qt 4, KDE Frameworks 5 use Qt 5.

JÃŒrgen
Post by Stephan Witt
Stephan
Loading...