[haiku-commits] haiku: hrev52160 - src/preferences/appearance

  • From: Jérôme Duval <jerome.duval@xxxxxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Thu, 2 Aug 2018 08:08:48 -0400 (EDT)

hrev52160 adds 1 changeset to branch 'master'
old head: b2acee1cb986b696adfad7daabfe9279949a3e54
new head: aa3c64e46da6a3113e9d0da7d1e63a8470291815
overview: 
https://git.haiku-os.org/haiku/log/?qt=range&q=aa3c64e46da6+%5Eb2acee1cb986

----------------------------------------------------------------------------

aa3c64e46da6: Appearance: fix "Fixed font" menu after the change to "Noto Sans 
Mono".

                                   [ Jérôme Duval <jerome.duval@xxxxxxxxx> ]

----------------------------------------------------------------------------

Revision:    hrev52160
Commit:      aa3c64e46da6a3113e9d0da7d1e63a8470291815
URL:         https://git.haiku-os.org/haiku/commit/?id=aa3c64e46da6
Author:      Jérôme Duval <jerome.duval@xxxxxxxxx>
Date:        Thu Aug  2 12:06:06 2018 UTC

----------------------------------------------------------------------------

1 file changed, 10 insertions(+), 4 deletions(-)
src/preferences/appearance/FontSelectionView.cpp | 14 ++++++++++----

----------------------------------------------------------------------------

diff --git a/src/preferences/appearance/FontSelectionView.cpp 
b/src/preferences/appearance/FontSelectionView.cpp
index eaae7b4d83..8b7ce5a025 100644
--- a/src/preferences/appearance/FontSelectionView.cpp
+++ b/src/preferences/appearance/FontSelectionView.cpp
@@ -15,14 +15,16 @@
 
 #include <Box.h>
 #include <Catalog.h>
+#include <GroupLayoutBuilder.h>
+#include <LayoutItem.h>
 #include <Locale.h>
 #include <MenuField.h>
 #include <MenuItem.h>
 #include <PopUpMenu.h>
 #include <String.h>
 #include <StringView.h>
-#include <LayoutItem.h>
-#include <GroupLayoutBuilder.h>
+
+#include <FontPrivate.h>
 
 #include <stdio.h>
 
@@ -449,9 +451,13 @@ FontSelectionView::UpdateFontsMenu()
                if (get_font_family(i, &family, &flags) != B_OK)
                        continue;
 
-               // if we're setting the fixed font, we only want to show fixed 
fonts
-               if (!strcmp(Name(), "fixed") && (flags & B_IS_FIXED) == 0)
+               // if we're setting the fixed font, we only want to show fixed 
and
+               // full-and-half-fixed fonts
+               if (strcmp(Name(), "fixed") == 0
+                       && (flags
+                               & (B_IS_FIXED | 
B_PRIVATE_FONT_IS_FULL_AND_HALF_FIXED)) == 0) {
                        continue;
+               }
 
                float width = font.StringWidth(family);
                if (width > fMaxFontNameWidth)


Other related posts: