markmal / freeship-plus-in-lazarus

FreeShip Plus in Lazarus
GNU General Public License v3.0
181 stars 35 forks source link

HiDpi screens show very small icons #4

Closed tvld closed 8 years ago

tvld commented 9 years ago

I have a Lenovoa Yoga Pro 2, 3200x1800, and the icons are oops... small...:

tvld commented 9 years ago

smscr2

markmal commented 9 years ago

Yes, icons are small. We need to make them bigger.

On 06/10/2015 08:05 AM, Tom wrote:

I have a Lenovoa Yoga Pro 2, 3200x1800, and the icons are oops... small...:

small_icons https://cloud.githubusercontent.com/assets/986182/8081955/baee9740-0f79-11e5-99ba-04c2d3948442.png

— Reply to this email directly or view it on GitHub https://github.com/markmal/freeship-plus-in-lazarus/issues/4.

tvld commented 9 years ago

On lower-res screen they are ok. I suppose two options: or scale automatically with screen dpi, or have a setting somewhere to adjust icon-scaling. The last option might be most universal for various distributions?

markmal commented 9 years ago

Simple upscaling will make icons look pixelated and ugly. I think, new set of bigger icons has to be created manually.

tvld commented 9 years ago

yeah. I might volunteer to create a set of .svg icons? These you can scale to any size

markmal commented 9 years ago

Excellent idea, Tom! Welcome aboard! I am not sure yet if SVG icons are supported in Lazarus/Qt controls directly, anyway, if not, we can convert them to bitmaps anytime in run time, when program starts.

tvld commented 9 years ago

First attempt: https://github.com/tvld/freeship-plus-in-lazarus/tree/master/Icons

markmal commented 9 years ago

Hi Tom! thanks! looks cool. I will start to make toolbar resizeable

On 06/18/2015 11:26 AM, Tom wrote:

First attempt: https://github.com/tvld/freeship-plus-in-lazarus/tree/master/Icons

— Reply to this email directly or view it on GitHub https://github.com/markmal/freeship-plus-in-lazarus/issues/4#issuecomment-113191551.

tvld commented 9 years ago

ok, then will proceed in same way. Would you need certain names for the icon files? If so, do you have a list?

speters commented 9 years ago

Hi Tom, great to see your work. A few days before, I also tried to draw some icons (https://github.com/speters/freeship-plus-in-lazarus/blob/master/resources/icons.svg), but I'm not satisfied with my results.

But it seems to be very hard to get it consistent, meaningful, and good looking at the same time. Even the guys from FreeCAD failed badly IMO (http://www.freecadweb.org/wiki/index.php?title=Artwork).

Have a nice day, Sönke

PS: Concerning the resizable icons, there is the Qt way of styling via some kind of stylesheets. This seems to work with standard elements (like on the file open dialogue), but I couldn't get it to work with the panel buttons. If this worked, SVG icons could be used directly. Another approach is eg. by loading the images with fpvectorial.

PS²: IMO, some buttons could be removed from the toolbar (file open, exit application) to save space for other icons. A fast accessable file open dialogue is useless in an application which has only one working document at a time. Other icons that could be dropped in my opinion are those icons related to 3rd party programs (Carlson, Carene PolyCAD, maybe even Michlet). They are only reachable via the menu bar which comes with a textual description anyway.

tvld commented 9 years ago

The trick is mostly to use standard, minimal palette.

Freecad fails with too many colors IMHO. The Freeship icons themselves are also not great, I think. The exit I never understood;))))

I have created this palette: https://github.com/tvld/freeship-plus-in-lazarus/blob/master/Icons/FreeShip-Standard-Palette.png If you think it is ok, we can proceed.

tvld commented 9 years ago

Sonke, Actually good work and we can syncrhonize. I will take your design and make separate icon files in the structure I suggested. Feel free to submit icons if you feel inclined, but let's agree we dont do the same based on our initial enthusiasm:))
Anyway, using Inkscape is easy and takes like no more than an hour for all icons I suppose.

tvld commented 9 years ago

With the excellent icons, dont be modest, of Sönke, updated: https://github.com/tvld/freeship-plus-in-lazarus/blob/master/Icons/preview/Icons_sprite_preview_white.png About 60% of icons I suppose ?

markmal commented 9 years ago

Hi guys, great work!

question. Is background supposed to be white, or it will be transparent? If the latter, please also try how they will look on grey buttons.

I've investigated with SVG support in Lazarus (aggpas, fpvectorial, bgrabitmap), unfortunately it looks like there is just little support, for basic SVG. No gradients, no transformations etc... It means we should create SVG icons and convert them to PNG of sizes 16,24,32,48,64,128 with using some 3-rd party tool.

Yes, icons should have names, I'll check.

On 06/19/2015 08:36 AM, Tom wrote:

With the excellent icons, dont be modest, of Sönke, updated: https://github.com/tvld/freeship-plus-in-lazarus/blob/master/Icons/preview/Icons_sprite_preview_white.png About 60% of icons I suppose ?

— Reply to this email directly or view it on GitHub https://github.com/markmal/freeship-plus-in-lazarus/issues/4#issuecomment-113501775.

tvld commented 9 years ago

Hi Mark, Did you check out the folders https://github.com/tvld/freeship-plus-in-lazarus/tree/master/Icons ? There are png in various sizes! Also in preview you notice on dark backgr. Not ok now... Should we have universal icons, without transparency.. or a dark theme version?

tvld commented 9 years ago

Committed a light background behind the icons to allow on dark themes. In the future I suppose we should create a dark and white themed icons set. For now, this is my contribution ;)

markmal commented 9 years ago

Tom, I like previews with both backgrounds. My question was, should we paint background in icons, or should be make it transparent. I think we should have capability to use whatever theme, just by configuring FreeShip to use certain theme and size. We just need a naming convention for directories and files. Like you already have. Like icons/{theme}/[svg|size] example: icons/light/svg/file-open.svg icons/light/png-16/file-open.png icons/light/png-24/file-open.png ... icons/dark/svg/file-open.svg icons/dark/png-16/file-open.png icons/dark/png-24/file-open.png etc

I am not sure what is meaning of numbers in your file names. Should we have the numbers there?

tvld commented 9 years ago

Mark, Freeship should draw the icons transparent I think. It depends on the desktop theme I suppose what people would like . Anyway, we can leave this decision to theme designers.

I like your idea about the theme structure. What would you think of this way:

/themes/default/icons/svg/file-open.svg /themes/default/icons/icons/light/png-16/file-open.png /themes/default/icons/icons/light/png-24/file-open.png ...

So we could add extra themes later on:

/themes/midnight-blue/icons/svg/file-open.svg /themes/midnight-blue/icons/icons/light/png-16/file-open.png ... FS can use an override mechanism: If a new theme did not define a certain icon, it would use the default which should always be present.

Thoughts?

markmal commented 9 years ago

Tom,

I like idea with default theme!

I only don't understand "/icons/icons/light/png-24/" piece. Why "icons" is 2 times, what is "light"? also lets use just "24" instead of "png-24", I think png is redundant here. should it matter for us what format files will be inside, png, or jpg?

I attach zip with names. Please rename your images accordingly, it is very important, because names of icons should be named exactly as names of actions in program. Sorry I am giving you names quite late. Did not have time during the week.

On 06/20/2015 06:17 AM, Tom wrote:

Mark, Freeship should draw the icons transparent I think. It depends on the desktop theme I suppose what people would like . Anyway, we can leave this decision to theme designers.

I like your idea about the theme structure. What would you think of this way:

/themes/default/icons/svg/file-open.svg /themes/default/icons/icons/light/png-16/file-open.png /themes/default/icons/icons/light/png-24/file-open.png ...

So we could add extra themes later on:

/themes/midnight-blue/icons/svg/file-open.svg /themes/midnight-blue/icons/icons/light/png-16/file-open.png ... WE can use an override mechanism: If a new theme did not define a certain icon, it would use the default which should always be present.

Thoughts?

— Reply to this email directly or view it on GitHub https://github.com/markmal/freeship-plus-in-lazarus/issues/4#issuecomment-113741155.

markmal commented 9 years ago

zip file with original icons was not attached. I'll upload it somehow and let you know.

markmal commented 9 years ago

I've placed it into release. please download https://github.com/markmal/freeship-plus-in-lazarus/releases/download/3.5.2.58/orig-icons-16.zip

tvld commented 9 years ago

Sorry, the path structure was my bad: a cut and paste mistake... I agree with the folder structure naming convention. The file names I needed indeed. Will use these and adapt my branch to it. Stay tuned ;)

tvld commented 9 years ago

Pushed new folder structure with names. Indeed I am missing quite a few icons. But.. I did not get your originals, your orig-icons-16.zip contains empty icons?

tvld commented 9 years ago

Just pushed new icons with removed transparency: I did not realize most icons had a useless opacity of 96%.

markmal commented 9 years ago

Hi Tom, what do you mean by missing and by empty?

may be issue is that the icons are not PNG, they are actually BMP. I my linux it (extention) does not matter, it shows them any way. I will rename and replace zip. You can rename too.

I've modified FreeShip to load icons from files, and to configure icon's dir and size. It can use dirs from themes, but idea of themes is not expressed in design so far.

We should discuss, what parameters will be included into a theme, icons, what else? may be graphic colors? what else?

On 06/21/2015 03:21 PM, Tom wrote:

Pushed new folder structure with names. Indeed I am missing quite a few icons. But.. I did not get your originals, your orig-icons-16.zip contains empty icons?

— Reply to this email directly or view it on GitHub https://github.com/markmal/freeship-plus-in-lazarus/issues/4#issuecomment-113945447.

tvld commented 9 years ago

Renaming to .bmp was solution indeed. Other theme stuff: maybe we could store background for toolbars = window decoration in standardised color definition file, for example in Json format? I now used a palette for inkscape. I suppose it all depends on what you could configure in the program itself?

markmal commented 9 years ago

Background for toolbar, as well as other controls look and feel comes from OS settings. I am not sure why we should change it for one program. And it will require quite amount of work. Colors that are specific to FreeShip (like line colors etc..) are already stored in ~/.config/FreeShip/FreeShip.ini file. I am not sure why we should change it to Json? Windows decorations are hard to change in X environment, it is in WindowManager domain which may be on user's computer, where X Server runs, and program can run on a different server computer (X Client). It is very hard to change, if even possible, whatever is in X Server from X Client.

For now I would add these settings to a theme. Each theme will have separate .ini file (i.e.Themes/Default/theme.ini) In this file will be section [Graphics] where FreeShip colors will be defined, and also is defined a size of icons (16,24,32,48,64,96,128) for tools and for menu (menu icons are not supported in current Qt, but may will be supported later. Menu icons are configured in program). Icons of each size will be stored in subfolders: Themes/Default/16, Themes/Default/24 etc... All icons will have standard names (that I've sent in zip). From beginning there will be configured Default theme with tool icon size 24. User can reconfigure something and save as a custom theme. How about this?

On Mon, Jun 22, 2015 at 10:54 AM, Tom notifications@github.com wrote:

Renaming to .bmp was solution indeed. Other theme stuff: maybe we could store background for toolbars = window decoration in standardised color definition file, for example in Json format? I now used a palette for inkscape. I suppose it all depends on what you could configure in the program itself?

— Reply to this email directly or view it on GitHub https://github.com/markmal/freeship-plus-in-lazarus/issues/4#issuecomment-114140230 .

tvld commented 9 years ago

Mark, my comments were without any understanding of the internal structure. What you suggest sounds fine to me.

tvld commented 9 years ago

I would suggest to also implement theme.ini with override mechanism. If we would not, adding a new setting to theme.ini sometime in future, would break a theme. Overriding would take the non-defined settings from the /Themes/default/theme.ini

markmal commented 9 years ago

Yes, and even more. A theme will have ParentTheme parameter. So themes can be born one of another inheriting properties. Default -> SomeTheme -> AnotherSubtheme ... Sort of OOP. Currently I am working on inheritance of icon files. Colors just copied from a parent then some may be customized. Icons can be re-defined in a child by placing file into its icon dirs.

On 06/23/2015 04:31 AM, Tom wrote:

I would suggest to also implement theme.ini with override mechanism. If we would not, adding a new setting to theme.ini sometime in future, would break a theme. Overriding would take the non-defined settings from the /Themes/default/theme.ini

— Reply to this email directly or view it on GitHub https://github.com/markmal/freeship-plus-in-lazarus/issues/4#issuecomment-114405905.

tvld commented 9 years ago

hm, dont get carried away I suppose? OOP sounds great but seems like you are putting a Ferrari Motor in an Volkswagen? )) Anyway, look forward to see the changes. Curious what it looks like :)

speters commented 9 years ago

In my opinion, an OOP theme sytem looks far too complicated at the current point. If doing something like that, it would be better to make the ToolBar/ToolButtons be stylable via the standard Qt way of using stylesheets, as support for this already exists partially in the Lazarus codes (e.g. you can load a Qt stylesheet by starting with a commandline parameter ./FreeShip -stylesheet style.txt, but this only works with widgets that are drawn by Qt).

In https://github.com/speters/freeship-plus-in-lazarus/pull/1 I tried a simple solution to make FreeShip load its ToolButton images from files, and adjust the ToolBar size accordingly.

freeship_largetoolbuttons

The screenshot shows that the ToolBar is a bit crowded. Buttons like open-file, new-document, exit are of not much use there.

markmal commented 9 years ago

Hi Sönke,

Though currently the app is compiled with Qt, I am trying to make it widgetset-agnostic as much as possible. Qt is chosen only for its out-of-the-box MDI windows support. I've already developed "OOP" (not really OOP, rather multi-generation) schemes support. Settings are done in GUI and stored in .ini files. It pretty much works, now I am testing... As soon as it will pass my simple tests I'll publish it in git soon.

Yesterday I've re-captured original icons with transparency, finally they look correct. :) And resized them to all bigger sizes 24,32,48,64,96,128. They do not look perfect, but are visible.

Currently I am awaiting from Tom some subset of icons to be created and named accordingly, that I could create "Tom Theme" as child of "Default".

Yes, toolbar is crowded. I have an idea to split it to multiple sub-toolbars by groups, and make them wrappable separately, and may be dockable, so they can be moved to side of screen and do not occupy vertical space. (I think horisontal space on our wide-screen displays is less valuable) What do you think?

On 06/26/2015 03:27 AM, Sönke J. Peters wrote:

In my opinion, an OOP theme sytem looks far too complicated at the current point. If doing something like that, it would be better to make the ToolBar/ToolButtons be stylable via the standard Qt way of using stylesheets, as support for this already exists partially in the Lazarus codes (e.g. you can load a Qt stylesheet by starting with a commandline parameter |./FreeShip -stylesheet style.txt|, but this only works with widgets that are drawn by Qt).

In speters#1 https://github.com/speters/freeship-plus-in-lazarus/pull/1 I tried a simple solution to make FreeShip load its ToolButton images from files, and adjust the ToolBar size accordingly.

freeship_largetoolbuttons https://cloud.githubusercontent.com/assets/1384994/8372574/afa5f67c-1be4-11e5-816a-e02b02b0a6be.png

The screenshot shows that the ToolBar is a bit crowded. Buttons like open-file, new-document, exit are of not much use there).

— Reply to this email directly or view it on GitHub https://github.com/markmal/freeship-plus-in-lazarus/issues/4#issuecomment-115561065.

tvld commented 9 years ago

Hi Mark... Why did you had to recreate all the icons, I pushed them 4 days ago? They should be all there in good quality, correct names and remove transparency? https://github.com/tvld/freeship-plus-in-lazarus/tree/master/Themes/default/Icons

markmal commented 9 years ago

I've recreated the original icons. Those I've captured from the program. (they are embedded into ImageList inside the program, not stored separately in files.) Yours are ready? I missed this :) How about keeping both sets? I'll call the theme "Original" :)

speters commented 9 years ago

FYI: I used convert resources/tile_* -transparent black -depth 8 -scale 32x32 ImgList%d.png to convert the original buttons to 8bit RGB with alpha/transparency. Paletted PNG didn't work for me.

markmal commented 9 years ago

I've placed orig-icons.zip into last release https://github.com/markmal/freeship-plus-in-lazarus/releases/download/3.5.2.58/orig-icons.zip I'll include it as "Original" theme. Tom's theme will be "Default". I like the way you've done toolbars, will merge it into trunk.

tvld commented 9 years ago

@ mark: Well.. took me a lot of hours to get them right. Better should not have started. @speters: with that you miss a lot. Please refer to the the convert commands in the script I developed for this.

markmal commented 9 years ago

FreeShip with themes and configurable icon size is released. https://github.com/markmal/freeship-plus-in-lazarus/releases/tag/3.5.3.1

markmal commented 9 years ago

Hi Tom, I'm working on toolbar changes. (changing the original single toolbar to multiple toolbars (i.e. Files, Visibility, etc..) that wrap their buttons separately when form is resized.

I've removed Precision control. And added Undo, Redo and DeselectAll buttons. Could you create icons for these new buttons: Undo.png, Redo.png and DeselectAll.png? freeship-toolbars

markmal commented 9 years ago

For Intersection DIalog also need icons "CloseDialog", "AddOne", "AddRange", "DeleteAll" intersection dialog icons

markmal commented 9 years ago

For Expaned Plates Dialog need more icons (some exist) expaned plates dialog

markmal commented 9 years ago

Icons for TFreeLinesplanFrame icons for tfreelinesplanframe

tvld commented 9 years ago

Good progress:) .. Will be happy to add the missing icons. Sadly, broke my foot and the issues around it taking a bit of energy. Will be back though. Need a week or so.

markmal commented 9 years ago

Sad to know :( Get well soon!

markmal commented 9 years ago

Hi Tom, For calculation dialogs we need three more icons: Ok.png, Cancel.png and Calculate.png

tvld commented 9 years ago

Hi Mark, Added all others ( I hope... ;) ) Any still missing?

markmal commented 9 years ago

Thanks Tom! I'll check it.

On Sun, Jul 5, 2015 at 3:39 PM, Tom notifications@github.com wrote:

Hi Mark, Added all others ( I hope... ;) ) Any still missing?

— Reply to this email directly or view it on GitHub https://github.com/markmal/freeship-plus-in-lazarus/issues/4#issuecomment-118660576 .

markmal commented 8 years ago

I think it can be closed.