diff options
-rw-r--r-- | src/defs.h | 4 | ||||
-rw-r--r-- | src/ui/mediaui.c | 2 | ||||
-rw-r--r-- | src/ui/root.c | 10 | ||||
-rw-r--r-- | src/ui/window.c | 8 |
4 files changed, 10 insertions, 14 deletions
@@ -42,6 +42,7 @@ enum iFileVersion { | |||
42 | 42 | ||
43 | /* Icons */ | 43 | /* Icons */ |
44 | 44 | ||
45 | #define menu_Icon "\U0001d362" | ||
45 | #define rightArrowhead_Icon "\u27a4" | 46 | #define rightArrowhead_Icon "\u27a4" |
46 | #define leftArrowhead_Icon "\u27a4" | 47 | #define leftArrowhead_Icon "\u27a4" |
47 | #define warning_Icon "\u26a0" | 48 | #define warning_Icon "\u26a0" |
@@ -110,6 +111,9 @@ enum iFileVersion { | |||
110 | # define shiftReturn_Icon shift_Icon " " return_Icon | 111 | # define shiftReturn_Icon shift_Icon " " return_Icon |
111 | #endif | 112 | #endif |
112 | 113 | ||
114 | #if defined (iPlatformAppleDesktop) | ||
115 | # define iHaveNativeMenus | ||
116 | #endif | ||
113 | 117 | ||
114 | /* UI labels that depend on the platform */ | 118 | /* UI labels that depend on the platform */ |
115 | 119 | ||
diff --git a/src/ui/mediaui.c b/src/ui/mediaui.c index bc417fc3..fa09b214 100644 --- a/src/ui/mediaui.c +++ b/src/ui/mediaui.c | |||
@@ -118,7 +118,7 @@ void draw_PlayerUI(iPlayerUI *d, iPaint *p) { | |||
118 | isPaused_Player(d->player) ? "\U0001f782" : "\u23f8", | 118 | isPaused_Player(d->player) ? "\U0001f782" : "\u23f8", |
119 | uiContent_FontId); | 119 | uiContent_FontId); |
120 | drawPlayerButton_(p, d->rewindRect, "\u23ee", uiContent_FontId); | 120 | drawPlayerButton_(p, d->rewindRect, "\u23ee", uiContent_FontId); |
121 | drawPlayerButton_(p, d->menuRect, "\U0001d362", uiContent_FontId); | 121 | drawPlayerButton_(p, d->menuRect, menu_Icon, uiContent_FontId); |
122 | if (!isAdjusting) { | 122 | if (!isAdjusting) { |
123 | drawPlayerButton_( | 123 | drawPlayerButton_( |
124 | p, d->volumeRect, volumeChar_(volume_Player(d->player)), uiContentSymbols_FontId); | 124 | p, d->volumeRect, volumeChar_(volume_Player(d->player)), uiContentSymbols_FontId); |
diff --git a/src/ui/root.c b/src/ui/root.c index 0ab969bf..76f4c0d7 100644 --- a/src/ui/root.c +++ b/src/ui/root.c | |||
@@ -52,10 +52,6 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ | |||
52 | 52 | ||
53 | #include <SDL_timer.h> | 53 | #include <SDL_timer.h> |
54 | 54 | ||
55 | #if defined (iPlatformAppleDesktop) | ||
56 | # define iHaveNativeMenus | ||
57 | #endif | ||
58 | |||
59 | #if defined (iPlatformPcDesktop) | 55 | #if defined (iPlatformPcDesktop) |
60 | /* TODO: Submenus wouldn't hurt here. */ | 56 | /* TODO: Submenus wouldn't hurt here. */ |
61 | static const iMenuItem navMenuItems_[] = { | 57 | static const iMenuItem navMenuItems_[] = { |
@@ -1158,11 +1154,11 @@ void createUserInterface_Root(iRoot *d) { | |||
1158 | #if !defined (iHaveNativeMenus) | 1154 | #if !defined (iHaveNativeMenus) |
1159 | # if defined (iPlatformAppleMobile) | 1155 | # if defined (iPlatformAppleMobile) |
1160 | iLabelWidget *navMenu = | 1156 | iLabelWidget *navMenu = |
1161 | makeMenuButton_LabelWidget("\U0001d362", isPhone ? phoneNavMenuItems_ : tabletNavMenuItems_, | 1157 | makeMenuButton_LabelWidget(menu_Icon, isPhone ? phoneNavMenuItems_ : tabletNavMenuItems_, |
1162 | isPhone ? iElemCount(phoneNavMenuItems_) : iElemCount(tabletNavMenuItems_)); | 1158 | isPhone ? iElemCount(phoneNavMenuItems_) : iElemCount(tabletNavMenuItems_)); |
1163 | # else | 1159 | # else |
1164 | iLabelWidget *navMenu = | 1160 | iLabelWidget *navMenu = |
1165 | makeMenuButton_LabelWidget("\U0001d362", navMenuItems_, iElemCount(navMenuItems_)); | 1161 | makeMenuButton_LabelWidget(menu_Icon, navMenuItems_, iElemCount(navMenuItems_)); |
1166 | # endif | 1162 | # endif |
1167 | setAlignVisually_LabelWidget(navMenu, iTrue); | 1163 | setAlignVisually_LabelWidget(navMenu, iTrue); |
1168 | setId_Widget(addChildFlags_Widget(navBar, iClob(navMenu), collapse_WidgetFlag), "navbar.menu"); | 1164 | setId_Widget(addChildFlags_Widget(navBar, iClob(navMenu), collapse_WidgetFlag), "navbar.menu"); |
@@ -1267,7 +1263,7 @@ void createUserInterface_Root(iRoot *d) { | |||
1267 | iClob(newLargeIcon_LabelWidget(book_Icon, "toolbar.showview arg:-1")), | 1263 | iClob(newLargeIcon_LabelWidget(book_Icon, "toolbar.showview arg:-1")), |
1268 | frameless_WidgetFlag | commandOnClick_WidgetFlag), | 1264 | frameless_WidgetFlag | commandOnClick_WidgetFlag), |
1269 | "toolbar.view"); | 1265 | "toolbar.view"); |
1270 | iLabelWidget *menuButton = makeMenuButton_LabelWidget("\U0001d362", phoneNavMenuItems_, | 1266 | iLabelWidget *menuButton = makeMenuButton_LabelWidget(menu_Icon, phoneNavMenuItems_, |
1271 | iElemCount(phoneNavMenuItems_)); | 1267 | iElemCount(phoneNavMenuItems_)); |
1272 | setFont_LabelWidget(menuButton, uiLabelLarge_FontId); | 1268 | setFont_LabelWidget(menuButton, uiLabelLarge_FontId); |
1273 | setId_Widget(as_Widget(menuButton), "toolbar.navmenu"); | 1269 | setId_Widget(as_Widget(menuButton), "toolbar.navmenu"); |
diff --git a/src/ui/window.c b/src/ui/window.c index 96a22fee..f71d8102 100644 --- a/src/ui/window.c +++ b/src/ui/window.c | |||
@@ -69,10 +69,6 @@ iDefineTypeConstructionArgs(Window, (iRect rect), rect) | |||
69 | 69 | ||
70 | /* TODO: Define menus per platform. */ | 70 | /* TODO: Define menus per platform. */ |
71 | 71 | ||
72 | #if defined (iPlatformAppleDesktop) | ||
73 | # define iHaveNativeMenus | ||
74 | #endif | ||
75 | |||
76 | #if defined (iHaveNativeMenus) | 72 | #if defined (iHaveNativeMenus) |
77 | /* Using native menus. */ | 73 | /* Using native menus. */ |
78 | static const iMenuItem fileMenuItems_[] = { | 74 | static const iMenuItem fileMenuItems_[] = { |
@@ -202,7 +198,7 @@ static void windowSizeChanged_Window_(iWindow *d) { | |||
202 | } | 198 | } |
203 | 199 | ||
204 | static void setupUserInterface_Window(iWindow *d) { | 200 | static void setupUserInterface_Window(iWindow *d) { |
205 | #if defined (iPlatformAppleDesktop) | 201 | #if defined (iHaveNativeMenus) |
206 | insertMacMenus_(); | 202 | insertMacMenus_(); |
207 | #endif | 203 | #endif |
208 | /* One root is created by default. */ | 204 | /* One root is created by default. */ |
@@ -913,7 +909,7 @@ iBool processEvent_Window(iWindow *d, const SDL_Event *ev) { | |||
913 | } | 909 | } |
914 | } | 910 | } |
915 | if (isCommand_UserEvent(&event, "lang.changed")) { | 911 | if (isCommand_UserEvent(&event, "lang.changed")) { |
916 | #if defined (iPlatformAppleDesktop) | 912 | #if defined (iHaveNativeMenus) |
917 | /* Retranslate the menus. */ | 913 | /* Retranslate the menus. */ |
918 | removeMacMenus_(); | 914 | removeMacMenus_(); |
919 | insertMacMenus_(); | 915 | insertMacMenus_(); |