Toolbar Icon Size on 4K Monitor

General discussion related to SketchUp Pro and Make

Toolbar Icon Size on 4K Monitor

Postby Bob James » Sat Jan 13, 2018 3:52 am

I know this must have been discussed last year, but the search tool rejects "4K" as being too small to find.

I am using a 55" 4K OLED monitor set at full resolution and 300% scale. The problem is that although SU toolbar icons appear "full size", the icons for extension toolbars are too small to see. How have you who are using 4K monitors solved this problem?

Icons. small.png
0
i7-4930K 3.4Ghz, 2x GTX780 6GB, 32GB DDR3-1600 ECC, OCZ Vertex 4 500GB, WD Black 3TB, 32TB NAS, 4x 27" Monitors, SpaceMouse Pro, X-keys XK-60
User avatar
Bob James 
Premium Member
Premium Member
 

Re: Toolbar Icon Size on 4K Monitor

Postby Bob James » Fri Feb 02, 2018 8:27 pm

Anybody???
0
i7-4930K 3.4Ghz, 2x GTX780 6GB, 32GB DDR3-1600 ECC, OCZ Vertex 4 500GB, WD Black 3TB, 32TB NAS, 4x 27" Monitors, SpaceMouse Pro, X-keys XK-60
User avatar
Bob James 
Premium Member
Premium Member
 

Re: Toolbar Icon Size on 4K Monitor

Postby fredo6 » Fri Feb 02, 2018 11:54 pm

Well, difficult to say as I don't have such monitor.

However, it would be good to understand what can be done for plugins. I guess that Sketchup has addressed the problem for itself with vector-based icons.

Do you have some plugins which have icons with 'normal' scaled size? (mine apparently do not scale).

Fredo
0
User avatar
fredo6 
PluginStore Author
PluginStore Author
 

Re: Toolbar Icon Size on 4K Monitor

Postby Bob James » Sun Feb 04, 2018 1:59 am

fredo wrote:Do you have some plugins which have icons with 'normal' scaled size? (mine apparently do not scale).Fredo

Thank you for replying Fredo :D
You can see two in the picture. There are two or three others, but all the rest are tiny,
I'm sure there are many others with 4k monitors: I wonder how they've solved the problem. I tried to do a search, but the search engine on this forum is not up to the job.
0
i7-4930K 3.4Ghz, 2x GTX780 6GB, 32GB DDR3-1600 ECC, OCZ Vertex 4 500GB, WD Black 3TB, 32TB NAS, 4x 27" Monitors, SpaceMouse Pro, X-keys XK-60
User avatar
Bob James 
Premium Member
Premium Member
 

Re: Toolbar Icon Size on 4K Monitor

Postby Bob James » Sun Feb 04, 2018 5:53 pm

Here are the other four that scale correctly:

icon.PNG
0
i7-4930K 3.4Ghz, 2x GTX780 6GB, 32GB DDR3-1600 ECC, OCZ Vertex 4 500GB, WD Black 3TB, 32TB NAS, 4x 27" Monitors, SpaceMouse Pro, X-keys XK-60
User avatar
Bob James 
Premium Member
Premium Member
 

Re: Toolbar Icon Size on 4K Monitor

Postby oceanembers » Mon Feb 05, 2018 1:53 pm

Looks like the plugins that scale all have icons in .svg and .pdf(???) as well as .png

I don't know enough about the Sketchup API to comment on how the icons are being loaded
0
User avatar
oceanembers 
 

Re: Toolbar Icon Size on 4K Monitor

Postby TBoy » Mon Feb 05, 2018 2:41 pm

The only possible way in my point of view is to resize icons manually. Yes it is not the solution you are looking for. But if you desperately need resizing you can do it.
Backup Plugins folder first.
Make some test resizing of any icon from plugins folder. Remember the best size for you. For example if you use big icons original image is 24/24 px, try resizing to 48/48 or bigger - after restart of Sketchup you will see the result.
Use graphic editor supporting batch processing (XnView), search for .png, narrow the search by size of the icons - this will eliminate some pictures not used as icons, use "delete original file" + "use original path (as output)" and resize icons to size of your tests.
Sounds idiotic but is possible.
(Updating of plugins will bring back original small icons.)
May be someone can write a script to automate this task >>> Search plugins folders for images 24x24px and resize to new value...???


Obviously only one external plugin is made with .SVG icons > "PLACE SHAPES TOOLBAR" and the author - Alexander Schreyer - deserves admiration.
0

TBoy 
 

Re: Toolbar Icon Size on 4K Monitor

Postby slbaumgartner » Mon Feb 05, 2018 3:24 pm

I too do not have a monitor to investigate this behavior and you didn't give a list of extensions/plugins that misbehave so I can't look at them to see what they do. As of SU 2016 the Ruby API supports vector icons (svg on Windows, pdf on Mac) for toolbars. Your profile says SU 2018, so scaling ought to work. Any extension that has been revised to use vector icons **should** see them scaled. The older-style png icons will not be scaled.

But I have read that there are remaining issues with very-high-dpi displays when the scaling is set to more than 150%. You write that you have set 300%. You may be encountering that issue - though I can't explain why it would affect some extensions and not others.
0

slbaumgartner 
PluginStore Author
PluginStore Author
 

Re: Toolbar Icon Size on 4K Monitor

Postby Bob James » Mon Feb 05, 2018 8:57 pm

slbaumgartner wrote:..you didn't give a list of extensions/plugins that misbehave so I can't look at them to see what they do.


Granted I did not list the names, but all of the toolbars that behave are shown:
Solid Tools
SectionCutFace
Bool Tools
3D Warehouse
Wrapr
Dynamic Components
Place Shapes
0
i7-4930K 3.4Ghz, 2x GTX780 6GB, 32GB DDR3-1600 ECC, OCZ Vertex 4 500GB, WD Black 3TB, 32TB NAS, 4x 27" Monitors, SpaceMouse Pro, X-keys XK-60
User avatar
Bob James 
Premium Member
Premium Member
 

Re: Toolbar Icon Size on 4K Monitor

Postby Bob James » Fri May 04, 2018 11:59 pm

Please
Can anyone using a 4K monitor shed any light on this problem?
0
i7-4930K 3.4Ghz, 2x GTX780 6GB, 32GB DDR3-1600 ECC, OCZ Vertex 4 500GB, WD Black 3TB, 32TB NAS, 4x 27" Monitors, SpaceMouse Pro, X-keys XK-60
User avatar
Bob James 
Premium Member
Premium Member
 

Re: Toolbar Icon Size on 4K Monitor

Postby derei » Sat May 05, 2018 4:41 pm

It seems that all bitmap icons (png) are not scaled, but only the vector icons are (svg, respectively pdf on mac).
So, the solution is for the plugin developers to start including svg toolbar icons.
0
DESIGNER AND ARTIST DEREI.UK
User avatar
derei 
 

Re: Toolbar Icon Size on 4K Monitor

Postby Dave R » Sat May 05, 2018 6:03 pm

derei is correct. SketchUp has switched to using SVG icons to deal with high res displays. Some extension authors have followed suit. Not all have, however. I expect the icons will get updates one of these days. Considering most of these extensions are free, patience is called for. Or perhaps one could hire someone to make new SVG icons for these extensions.
0
%

(THERE'S NO PLACE LIKE)

G28 X0.0 Y0.0 Z0.0

M30

%
User avatar
Dave R 
Global Moderator
 

Re: Toolbar Icon Size on 4K Monitor

Postby Pixero » Sat May 05, 2018 7:28 pm

Does anyone know if there is something special that needs to be done in the scripts code to use SVG icons or can we just put SVG icons in the plugins directory?
0
User avatar
Pixero 
 

Re: Toolbar Icon Size on 4K Monitor

Postby Dave R » Sat May 05, 2018 7:36 pm

I think SketchUp will look first for SVG icons and use them if they exist.
0
%

(THERE'S NO PLACE LIKE)

G28 X0.0 Y0.0 Z0.0

M30

%
User avatar
Dave R 
Global Moderator
 

Re: Toolbar Icon Size on 4K Monitor

Postby Bob James » Sat May 05, 2018 8:33 pm

Many thanks to the three of you for taking the time to reply :!:

It seems somewhat incredible that given the vast amount of plugins/extensions .jpg toolbar icons being used by every SU user that SU would be modified to only use svg icons.
How in the world did this get past beta testing????
0
i7-4930K 3.4Ghz, 2x GTX780 6GB, 32GB DDR3-1600 ECC, OCZ Vertex 4 500GB, WD Black 3TB, 32TB NAS, 4x 27" Monitors, SpaceMouse Pro, X-keys XK-60
User avatar
Bob James 
Premium Member
Premium Member
 

Re: Toolbar Icon Size on 4K Monitor

Postby Dave R » Sat May 05, 2018 10:00 pm

SVG icons were chosen specifically because they can be scaled to compensate for high res screens. Open a PNG icon in your image editor and scale it up so you can see it. The quality will be crap. SVG just makes sense.
0
%

(THERE'S NO PLACE LIKE)

G28 X0.0 Y0.0 Z0.0

M30

%
User avatar
Dave R 
Global Moderator
 

Re: Toolbar Icon Size on 4K Monitor

Postby Pixero » Sat May 05, 2018 10:11 pm

Could we make a community effort to update all these icons to SVG if the authors don’t do it?
0
User avatar
Pixero 
 

Re: Toolbar Icon Size on 4K Monitor

Postby Dave R » Sat May 05, 2018 10:15 pm

That sounds like a good idea. I would suggest offering the same icon packages to the authors so they can include them in updates of their extensions.
0
%

(THERE'S NO PLACE LIKE)

G28 X0.0 Y0.0 Z0.0

M30

%
User avatar
Dave R 
Global Moderator
 

Re: Toolbar Icon Size on 4K Monitor

Postby slbaumgartner » Sat May 05, 2018 10:35 pm

Pixero wrote:Does anyone know if there is something special that needs to be done in the scripts code to use SVG icons or can we just put SVG icons in the plugins directory?


The icon files are given explicitly by the plugin code, which has to choose between the old png for SketchUp versions prior to 2016, and between svg and pdf for Windows vs Mac. It doesn't take a lot of code, but has to be changed, and no, simply dropping a svg file into the folder won't do the trick.
0

slbaumgartner 
PluginStore Author
PluginStore Author
 

Re: Toolbar Icon Size on 4K Monitor

Postby fredo6 » Sun May 06, 2018 12:43 am

...in addition to the relevant comment by slbaumgartner, I would add that there is no automated way to generate a nice SVG from a PNG. Basically, the icon has be redrawn in SVG (via Inskape or similar drawing software).

Fredo
0
User avatar
fredo6 
PluginStore Author
PluginStore Author
 

Re: Toolbar Icon Size on 4K Monitor

Postby Bob James » Sun May 06, 2018 1:08 am

Dave R wrote:SVG icons were chosen specifically because they can be scaled to compensate for high res screens. Open a PNG icon in your image editor and scale it up so you can see it. The quality will be crap. SVG just makes sense.


Thank you, Dave.
Yes, it does make good sense, but only if there is an easy path for changing all of the hundreds of current plugin/extension icons. This is based on the assumption that as time goes on more and more people will upgrade to 4k. But, apparently, the consensus is that 4k will remain a niche.
0
i7-4930K 3.4Ghz, 2x GTX780 6GB, 32GB DDR3-1600 ECC, OCZ Vertex 4 500GB, WD Black 3TB, 32TB NAS, 4x 27" Monitors, SpaceMouse Pro, X-keys XK-60
User avatar
Bob James 
Premium Member
Premium Member
 

Re: Toolbar Icon Size on 4K Monitor

Postby Pixero » Sun May 06, 2018 5:58 am

Could someone post a code snippet that shows how to implement svg or pdf icons so I could start updating my own plugins at least.
0
User avatar
Pixero 
 

Re: Toolbar Icon Size on 4K Monitor

Postby slbaumgartner » Sun May 06, 2018 2:08 pm

Here's an example from one of my extensions:

Code: Select all
if(not file_loaded?(__FILE__))
  cmd = UI::Command.new("RakeAndSplay") {Sketchup.active_model.select_tool(SLBPlugins::RakeAndSplayTool.get_tool)}
  cmd.menu_text = "Rake and Splay"
  if(Sketchup.version.to_i >= 16)
    if(RUBY_PLATFORM =~ /darwin/)
      cmd.small_icon = Sketchup.find_support_file("rake_and_splay.pdf", "Plugins/SB_rake_and_splay")
      cmd.large_icon = Sketchup.find_support_file("rake_and_splay.pdf", "Plugins/SB_rake_and_splay")
    else
      cmd.small_icon = Sketchup.find_support_file("rake_and_splay.svg", "Plugins/SB_rake_and_splay")
      cmd.large_icon = Sketchup.find_support_file("rake_and_splay.svg", "Plugins/SB_rake_and_splay")
    end
  else
    cmd.small_icon = Sketchup.find_support_file("rake_and_splay_16.png", "Plugins/SB_rake_and_splay")
    cmd.large_icon = Sketchup.find_support_file("rake_and_splay_24.png", "Plugins/SB_rake_and_splay")
  end
  tb = UI::Toolbar.new("Rake and Splay").add_item(cmd)
  tb.restore if tb.get_last_state == 1
  UI.menu("Tools").add_item cmd
end
file_loaded(__FILE__)
1

slbaumgartner 
PluginStore Author
PluginStore Author
 

Re: Toolbar Icon Size on 4K Monitor

Postby Pixero » Sun May 06, 2018 3:35 pm

Thanks.
0
User avatar
Pixero 
 

Re: Toolbar Icon Size on 4K Monitor

Postby Bob James » Sun May 06, 2018 4:59 pm

Thank you, slbaumgartner
Would you tell me how to use this for each plugin extension?
0
i7-4930K 3.4Ghz, 2x GTX780 6GB, 32GB DDR3-1600 ECC, OCZ Vertex 4 500GB, WD Black 3TB, 32TB NAS, 4x 27" Monitors, SpaceMouse Pro, X-keys XK-60
User avatar
Bob James 
Premium Member
Premium Member
 

Re: Toolbar Icon Size on 4K Monitor

Postby Bob James » Sun May 06, 2018 11:58 pm

slbaumgartner wrote:simply dropping a svg file into the folder won't do the trick

He's right!
I converted and replaced the icons in SketchUcation to .svg at 300pixelsx300pixels at 300dpi but there was no change in SU2018

icons 300-1.png
0
i7-4930K 3.4Ghz, 2x GTX780 6GB, 32GB DDR3-1600 ECC, OCZ Vertex 4 500GB, WD Black 3TB, 32TB NAS, 4x 27" Monitors, SpaceMouse Pro, X-keys XK-60
User avatar
Bob James 
Premium Member
Premium Member
 

Re: Toolbar Icon Size on 4K Monitor

Postby slbaumgartner » Mon May 07, 2018 1:17 am

Bob James wrote:Thank you, slbaumgartner
Would you tell me how to use this for each plugin extension?


If you're not familiar with Ruby API programming for SketchUp, you might be in over your head as the code needs to be adapted to each specific extension, there is no universal drop-in-place form.

You need to create the appropriate icon files (svg, pdf, and png) for the extension and put them in the extension's folder. Then you need to find where in the extension's code it creates and populates its toolbar and integrate my snippet with whatever the original code does there, which will almost surely vary from case to case.
0

slbaumgartner 
PluginStore Author
PluginStore Author
 

Re: Toolbar Icon Size on 4K Monitor

Postby fredo6 » Mon May 07, 2018 1:14 pm

For inof, all my plugins can support PNG, SVG and PDF (as everything is managed by LibFredo6).

I am just missing the icons in SVG / PDF

That's just a matter to put the SVG / PDF file in:
- subfolder IMAGES_Standards of the plugin folder (say Fredo6_FredoScale/IMAGES_standard)
- respecting convention: same name as PNG but removing the trailing _24 (or _16 or _32). So FSC_icon_Scale_24.png would become FSC_icon_Scale.svg

Fredo
3
User avatar
fredo6 
PluginStore Author
PluginStore Author
 

Re: Toolbar Icon Size on 4K Monitor

Postby Pixero » Mon May 07, 2018 2:08 pm

Question. Does the svg/PDF icons need to be made in a special size? (I know they are scaleable just wondering if the dokument size should be anything special.)
0
User avatar
Pixero 
 

Re: Toolbar Icon Size on 4K Monitor

Postby slbaumgartner » Mon May 07, 2018 5:53 pm

Pixero wrote:Question. Does the svg/PDF icons need to be made in a special size? (I know they are scaleable just wondering if the dokument size should be anything special.)


You can draw the icon artwork at whatever size you wish. The view of the contents will be scaled to fit the available space in the toolbar button, so the physical size you drew is irrelevant. But you do need to verify that you haven't put details into the artwork that won't be visible when scaled to a typical toolbar button on a particular size display. Since you probably don't have a lot of different displays available to test, the best practice is to keep your icons fairly simple.

One precaution though: Whatever size you draw, you should keep the drawing canvas square. Otherwise SketchUp will scale it based on the larger dimension and it won't fill the full button in the other direction.
1

slbaumgartner 
PluginStore Author
PluginStore Author
 

SketchUcation One-Liner Adverts

by Ad Machine » 5 minutes ago



Ad Machine 
Robot
 

Next


 

Return to SketchUp Pro & Make Discussions

cron

Who is online

Users browsing this forum: Google Bot and 17 guests

Visit our sponsors: