Announcement

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

    Change all font sizes

    Hi
    I'm using SmartGWT Pro version 2.5.
    I would like to make the font size used for all text larger.
    I've searched around. Is there an easy way to do this?
    Please help.
    Regards
    Henkie

    #2
    Do you have some solution for this?

    Comment


      #3
      No. I'm waiting. I fear that I will have to set the style on each component - which will be sorry because I like the default style currently.

      Comment


        #4
        Hi, to change the font-size of labels, field and other components I coped the content from skin_style.css and pasted in my css file, then I replaced all font-size with 11px to 13px !important

        Comment


          #5
          Thanks!! I'll try that.

          Comment


            #6
            So what, if any, is the way to change font size, decoration, weight etc. inline without performing css surgery on the sgwt css?

            Thanks,

            Comment


              #7
              If you want to pervasively change the font, create your own skin (instructions in QuickStart Guide) or override all styles by copying the entire skin_styles.css file.

              If you just want selective changes just add CSS styles normally. Bear in mind, two .css styles with the same name are cumulative, so you can just specify changes.

              Comment


                #8
                Thanks,

                Is there a way to perform some inline text styling at the java api level?

                Comment


                  #9
                  Yes, there are APIs like listGrid.getCellCSSText(), and anywhere you see a formatter API you could output a <span> with a "style" attribute. But we wouldn't recommend this approach as a solution for pervasively changing the font.

                  Comment


                    #10
                    I am working with a webapp written with:
                    1. SmartGWT 5.0, downloaded on 2015-07-18
                    2. SmartClient Version: v10.0p_2015-07-18/LGPL Development Only (built 2015-07-18)

                    Jedi-Son offered to edit skin_style.css, but it's an 11k one-line file.

                    Is there an easier way (like programmatically) to make everything bigger so that the webapp looks better on mobiles?
                    Or does anybody have a skin to share that helps with this?

                    Comment


                      #11
                      Yes - instead of using a version of the framework from 7 years ago, use a recent version, and use the Skin Editor to create your skin.

                      Comment


                        #12
                        Originally posted by Isomorphic View Post
                        Yes - instead of using a version of the framework from 7 years ago, use a recent version, and use the Skin Editor to create your skin.
                        I can understand that this is annoying, but the webapp was written 9 years ago, with the latest at the time, and upgrading is a tall order...

                        I tried this, but it throws off layouts:
                        Code:
                        <script type="text/javascript"> document.body.style.zoom=1.25; </script>

                        Comment


                          #13
                          That won't work - you're using a very old version of the framework - man-handling more recent standards into the mix won't help.

                          If you need to stay on SmartClient 10.0 for some reason (again, not a good idea because it's old and will become unsupported at some point), you may need to contact us for a specialist support agreement. We don't ordinarily support the latest approaches in 9 year-old software, of course.

                          However - if you want to update to a "modern" version of the software, from the last 5 years or so but ideally 13.x, you can use Canvas.resizeControls()/resizeFonts() and related APIs to manage the size of your UI.
                          Last edited by Isomorphic; 1 Sep 2024, 21:28.

                          Comment


                            #14

                            Got it.
                            And completely understandable.
                            Thank you for taking the time, and on a long-weekend Sunday at that.

                            Comment

                            Working...
                            X