planetfederal / qgis-geogiglight-plugin

GNU General Public License v2.0
19 stars 9 forks source link

icons should be svg #99

Closed bartvde closed 6 years ago

bartvde commented 7 years ago

So they are better visible on hidpi screens

selection_015

SrNetoChan commented 7 years ago

Who design those? Some I recognize from QGIS.

I can try to create SVG versions for it.

SrNetoChan commented 7 years ago

@bartvde the icons were converted but I don't have a hidpi screen to check if it works. Do you?

bartvde commented 7 years ago

I do, I will check tomorrow

bartvde commented 7 years ago

this is what I get now:

selection_226

SrNetoChan commented 7 years ago

Is it still too small? I guess that the icon size must be set in the plugin. @volaya any ideas?

volaya commented 7 years ago

mmm, i will see, but i think Qt should adapt the size to the screen resolution. The size of the icon is not set, we are just specifying the icon file, so that is done by Qt (apparenty not correctly). I will check

elpaso commented 7 years ago

@volaya Qt5 should handle this correctly, but I couldn't find a better way than rendering svg to QPixMap for Qt4 such as in https://github.com/boundlessgeo/qgis-basemaps-plugin/blob/master/boundlessbasemaps/gui/setupwizard.py#L75

elpaso commented 7 years ago

Sorry, the link was for PNG, this is for SVG https://github.com/boundlessgeo/qgis-basemaps-plugin/blob/master/boundlessbasemaps/gui/setupwizard.py#L439 but the logic is the same

volaya commented 7 years ago

I tried to use that strategy, but it seems i cannot put a larger icon in the toolbar

I have now

QIcon(QPixmap(icon.pixmap(size)))

if size is smaller, i get tiny icons, so it works. If I set the size to a larger thing (let's say 100x100), I still get the regular size icon.

I have tried adding also self.navigatorToolbar.setIconSize(size), but it doesnt work. Qt docs say that wont scale smaller icons, but looks like even if the icon is already large (explicitely scaled when creating the new icon), it will put it at the normal size.

Any ideas?

alexbruy commented 6 years ago

Should be fixed with latest UI rewamp. Please reopen if necessary