Forum
    • Categories
    • Register
    • Login

    Font not changing on comboBox. What am I doing wrong?

    Scheduled Pinned Locked Moved General Questions
    20 Posts 4 Posters 691 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • dannytaurusD
      dannytaurus @David Healey
      last edited by dannytaurus

      @David-Healey Fixed here: https://github.com/christophhart/HISE/pull/838

      The line that applies the LAF to the combo box was commented out. Might be a good reason for that, but this change does fix the bug as reported.

      UPDATE: just checked if script LAF can still override the Interface Designer settings and it can, so this fix seems OK.

      Meat Beats: https://meatbeats.com
      Klippr Video: https://klippr.video

      David HealeyD 1 Reply Last reply Reply Quote 1
      • David HealeyD
        David Healey @dannytaurus
        last edited by

        @dannytaurus Hmm it's from this commit. I wonder if he was just testing something and forgot to uncomment it.

        Free HISE Bootcamp Full Course for beginners.
        YouTube Channel - Public HISE tutorials
        My Patreon - HISE tutorials

        dannytaurusD 1 Reply Last reply Reply Quote 1
        • dannytaurusD
          dannytaurus @David Healey
          last edited by

          @David-Healey Maybe, yeah.

          Meat Beats: https://meatbeats.com
          Klippr Video: https://klippr.video

          David HealeyD 1 Reply Last reply Reply Quote 0
          • David HealeyD
            David Healey @dannytaurus
            last edited by

            @dannytaurus fontSize doesn't affect the popup items.

            Free HISE Bootcamp Full Course for beginners.
            YouTube Channel - Public HISE tutorials
            My Patreon - HISE tutorials

            dannytaurusD 1 Reply Last reply Reply Quote 0
            • David HealeyD
              David Healey
              last edited by

              Something else interesting. I modified the drawComboBox laf function to include the font.

              		Font font = getComboBoxFont(cb);
              
              		obj->setProperty("fontName", font.getTypefaceName());
              		obj->setProperty("fontSize", font.getHeight());
              

              The font size is returned correctly but the fontName is always lato

              Free HISE Bootcamp Full Course for beginners.
              YouTube Channel - Public HISE tutorials
              My Patreon - HISE tutorials

              dannytaurusD 2 Replies Last reply Reply Quote 0
              • dannytaurusD
                dannytaurus @David Healey
                last edited by

                @David-Healey said in Font not changing on comboBox. What am I doing wrong?:

                @dannytaurus fontSize doesn't affect the popup items.

                Seems like font size for items works up to a max size.

                CleanShot 2026-01-04 at 13.36.22.gif

                Meat Beats: https://meatbeats.com
                Klippr Video: https://klippr.video

                dannytaurusD David HealeyD 2 Replies Last reply Reply Quote 0
                • dannytaurusD
                  dannytaurus @dannytaurus
                  last edited by

                  Ah, it relates to item height, which is set from combo box height.

                  CleanShot 2026-01-04 at 13.38.28.gif

                  Meat Beats: https://meatbeats.com
                  Klippr Video: https://klippr.video

                  1 Reply Last reply Reply Quote 1
                  • David HealeyD
                    David Healey @dannytaurus
                    last edited by

                    @dannytaurus I'm getting a crash when I load my project - it's a big project - going to try and see what the cause is.

                    Free HISE Bootcamp Full Course for beginners.
                    YouTube Channel - Public HISE tutorials
                    My Patreon - HISE tutorials

                    David HealeyD 1 Reply Last reply Reply Quote 0
                    • dannytaurusD
                      dannytaurus @David Healey
                      last edited by

                      @David-Healey So looks like item font size is set to combo box height / 1.3

                      Meat Beats: https://meatbeats.com
                      Klippr Video: https://klippr.video

                      1 Reply Last reply Reply Quote 0
                      • David HealeyD
                        David Healey @David Healey
                        last edited by

                        @David-Healey said in Font not changing on comboBox. What am I doing wrong?:

                        @dannytaurus I'm getting a crash when I load my project - it's a big project - going to try and see what the cause is.

                        Seems to be one of those crashes that magically resolves itself after restarting HISE a few times...

                        Still not sure why the font isn't correct in laf. I guess getComboBoxFont doesn't pick up the selected font.

                        Free HISE Bootcamp Full Course for beginners.
                        YouTube Channel - Public HISE tutorials
                        My Patreon - HISE tutorials

                        1 Reply Last reply Reply Quote 0
                        • dannytaurusD
                          dannytaurus @David Healey
                          last edited by

                          @David-Healey
                          Which file are you adding this to?

                          		Font font = getComboBoxFont(cb);
                          
                          		obj->setProperty("fontName", font.getTypefaceName());
                          		obj->setProperty("fontSize", font.getHeight());
                          

                          The font size is returned correctly but the fontName is always lato

                          Meat Beats: https://meatbeats.com
                          Klippr Video: https://klippr.video

                          David HealeyD 1 Reply Last reply Reply Quote 0
                          • David HealeyD
                            David Healey @dannytaurus
                            last edited by

                            @dannytaurus ScriptingGraphics.cpp in ScriptingObjects::ScriptedLookAndFeel::Laf::drawComboBox()

                            Free HISE Bootcamp Full Course for beginners.
                            YouTube Channel - Public HISE tutorials
                            My Patreon - HISE tutorials

                            dannytaurusD 1 Reply Last reply Reply Quote 1
                            • dannytaurusD
                              dannytaurus @David Healey
                              last edited by

                              @David-Healey Looks like Font font = getComboBoxFont(cb); might return the global font.

                              // hi_tools/hi_tools/HI_LookAndFeels.cpp
                              
                              Font AlertWindowLookAndFeel::getComboBoxFont(ComboBox& comboBox)
                              {
                              	return GLOBAL_FONT();
                              }
                              

                              There are quite a few definitions of getComboBoxFont and I don't which is which.

                              Meat Beats: https://meatbeats.com
                              Klippr Video: https://klippr.video

                              David HealeyD 1 Reply Last reply Reply Quote 0
                              • David HealeyD
                                David Healey @dannytaurus
                                last edited by

                                @dannytaurus Ah yeah that would make sense. I wonder where HISE stores the actual selection from the property editor.

                                Free HISE Bootcamp Full Course for beginners.
                                YouTube Channel - Public HISE tutorials
                                My Patreon - HISE tutorials

                                1 Reply Last reply Reply Quote 0
                                • First post
                                  Last post

                                9

                                Online

                                2.1k

                                Users

                                13.2k

                                Topics

                                114.3k

                                Posts