No announcement yet.
  • Filter
  • Time
Clear All
new posts

    6.1 Tahoe: SectionStackSection icon is getting enlarged and therefore does not look sharp

    Hi Isomorphic,

    please see these two screenshots from v11.1p_2018-01-18 and v11.1p_2018-02-16.
    In the latter one, the icon gets enlarged (I'm using Canvas.resizeFonts(2); Canvas.resizeControls(8); in my onModuleLoad()), which should not be the case IMHO.

    Click image for larger version  Name:	SectionStackSection Icon.png Views:	1 Size:	8.6 KB ID:	251843

    Best regards

    We just added docs recently here: resizeFonts will resize some icons because the size change for fonts is a better match than for the controls. The icons won't look fuzzy so long as the media has succifient resolution.


      Hi Isomorphic,

      this would work if I used SVGs, which I do not yet. Otherwise it is hard to know which the actual dimensions will be.

      Thanks for the hint on the changed docs.
      Certain controls such as icons are resized when fonts are resized (see setAutoResizeIcons() and setAutoResizeAutoChildAttributes()) so you might want to set resizeRelatedControls to false where you are just trying to make fonts in a dynamically loaded stylesheet match previously loaded fonts, but controls such as icons should not be resized upwards again.
      This answers my question "Is it possible to disable this somehow in load_skin.js? Generally or on a per Class basis?". I'll try this and let you know.

      Thank you & Best regards


        Hi Isomorphic,

        Is there a way to toggle this behavior on a per Class basis?

        We needed to leverage the capabilities of IconMenuButton in a ToolStrip (unfortunately, there is no ToolStripIconMenuButton).

        When using Tahoe, the ToolStripButton icon DOES get auto-resized when using Canvas.resizeFonts()/Canvas.resizeControls(), however, the IconMenuButton icon DOES NOT get auto-resized, creating an inconsistency for us. We'd like to be able to change the IconMenuButton to do the icon re-sizing too in this case.



          Yes, you can register IconButton for icon-resizing in load_skin.js - it should already be happening, and we've made that change in Tahoe and family for tomorrow's builds of 13.0 and 12..1, dated July 21 and later. Let us know if you have an older version.

          You can do it in your local skin, if you like, by adding IconButton:[ "iconSize" ] to the end of the object passed in the first call to isc.Canvas.registerIconSizingAttributes("fonts", {...}).


            Hi Isomorphic,

            Thank you for the update. I added the change and am now seeing the icon change size, however, when the ToolStripButton icon is 18x18, the IconMenuButton is 19x19. It always appears to be 1x1 more than the ToolStripButton.

            SmartClient Version: v12.1p_2020-09-29/Pro Deployment (built 2020-09-29)



              This was a long-standing bug in the Flat skins, where ToolStripButton was being defaulted to iconSize: 15px, rather than the usual 16px framework-default for icons.

              We've fixed it for tomorrow's builds, dated July 22 and later.

              You can fix this one locally too, by finding the isc.ToolStripButton block in load_skin.js and removing both the iconSize (15px) and height (17px) settings from it.

              [Edit: if you're using our framework RichTextEditor icons, as our Showcase ToolStrip samples do, you may see some degradation in those icons, because they happen to have a native size of 18px - we'll add higher-res ones shortly.]
              Last edited by Isomorphic; 20 Jul 2021, 22:25.


                Thank you,
                The icon resizing is now consistent.