summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/defs.h13
-rw-r--r--src/ui/documentwidget.c14
-rw-r--r--src/ui/labelwidget.c6
-rw-r--r--src/ui/sidebarwidget.c25
4 files changed, 36 insertions, 22 deletions
diff --git a/src/defs.h b/src/defs.h
index b346b93c..c1514c73 100644
--- a/src/defs.h
+++ b/src/defs.h
@@ -31,6 +31,7 @@ enum iFileVersion {
31 31
32/* Icons */ 32/* Icons */
33 33
34#define warning_Icon "\u26a0"
34#define openLock_Icon "\U0001f513" 35#define openLock_Icon "\U0001f513"
35#define closedLock_Icon "\U0001f512" 36#define closedLock_Icon "\U0001f512"
36#define close_Icon "\u2a2f" 37#define close_Icon "\u2a2f"
@@ -40,22 +41,30 @@ enum iFileVersion {
40#define upArrow_Icon "\u2191" 41#define upArrow_Icon "\u2191"
41#define upArrowBar_Icon "\u2912" 42#define upArrowBar_Icon "\u2912"
42#define downArrowBar_Icon "\u2913" 43#define downArrowBar_Icon "\u2913"
44#define rightArrowWhite_Icon "\u21e8"
45#define rightArrow_Icon "\u279e"
43#define barLeftArrow_Icon "\u21a4" 46#define barLeftArrow_Icon "\u21a4"
44#define barRightArrow_Icon "\u21a6" 47#define barRightArrow_Icon "\u21a6"
45#define clock_Icon "\U0001f553" 48#define clock_Icon "\U0001f553"
46#define pin_Icon "\U0001f588" 49#define pin_Icon "\U0001f588"
47#define star_Icon "\u2605" 50#define star_Icon "\u2605"
51#define whiteStar_Icon "\u2606"
48#define person_Icon "\U0001f464" 52#define person_Icon "\U0001f464"
49#define download_Icon "\u2ba7" 53#define download_Icon "\u2ba7"
50#define hourglass_Icon "\u231b" 54#define hourglass_Icon "\u231b"
51#define timer_Icon "\u23f2" 55#define timer_Icon "\u23f2"
52#define home_Icon "\U0001f3e0" 56#define home_Icon "\U0001f3e0"
53#define edit_Icon "\u270e" 57#define edit_Icon "\u270e"
54#define delete_Icon "\u2bbf" 58#define delete_Icon "\u232b" //"\u2bbf"
55#define copy_Icon "\u2bba" 59#define copy_Icon "\u2bba"
56#define check_Icon "\u2714" 60#define check_Icon "\u2714"
57#define ballotCheck_Icon "\U0001f5f9" 61#define ballotCheck_Icon "\U0001f5f9"
58#define inbox_Icon "\U0001f4e5" 62#define inbox_Icon "\U0001f4e5"
59#define book_Icon "\U0001f56e" 63#define book_Icon "\U0001f56e"
60#define open_Icon "\u2bab" 64#define openTab_Icon "\u2750"
65#define openTabBg_Icon "\u2b1a"
66#define openExt_Icon "\u27a0"
61#define add_Icon "\u2795" 67#define add_Icon "\u2795"
68#define page_Icon "\U0001d363" // "\U0001f5b9"
69#define circle_Icon "\u25cf"
70#define circleWhite_Icon "\u25cb"
diff --git a/src/ui/documentwidget.c b/src/ui/documentwidget.c
index 3a317890..9ae36b46 100644
--- a/src/ui/documentwidget.c
+++ b/src/ui/documentwidget.c
@@ -987,14 +987,14 @@ static void updateTrust_DocumentWidget_(iDocumentWidget *d, const iGmResponse *r
987 setFlags_Widget(as_Widget(lock), disabled_WidgetFlag, iFalse); 987 setFlags_Widget(as_Widget(lock), disabled_WidgetFlag, iFalse);
988 const iBool isDarkMode = isDark_ColorTheme(colorTheme_App()); 988 const iBool isDarkMode = isDark_ColorTheme(colorTheme_App());
989 if (~d->certFlags & domainVerified_GmCertFlag) { 989 if (~d->certFlags & domainVerified_GmCertFlag) {
990 updateTextCStr_LabelWidget(lock, red_ColorEscape "\u26a0"); 990 updateTextCStr_LabelWidget(lock, red_ColorEscape warning_Icon);
991 } 991 }
992 else if (d->certFlags & trusted_GmCertFlag) { 992 else if (d->certFlags & trusted_GmCertFlag) {
993 updateTextCStr_LabelWidget(lock, green_ColorEscape closedLock_Icon); 993 updateTextCStr_LabelWidget(lock, green_ColorEscape closedLock_Icon);
994 } 994 }
995 else { 995 else {
996 updateTextCStr_LabelWidget(lock, isDarkMode ? orange_ColorEscape "\u26a0" 996 updateTextCStr_LabelWidget(lock, isDarkMode ? orange_ColorEscape warning_Icon
997 : black_ColorEscape "\u26a0"); 997 : black_ColorEscape warning_Icon);
998 } 998 }
999 setBanner_GmDocument(d->doc, bannerType_DocumentWidget_(d)); 999 setBanner_GmDocument(d->doc, bannerType_DocumentWidget_(d));
1000} 1000}
@@ -2427,11 +2427,11 @@ static iBool processEvent_DocumentWidget_(iDocumentWidget *d, const SDL_Event *e
2427 pushBackN_Array( 2427 pushBackN_Array(
2428 &items, 2428 &items,
2429 (iMenuItem[]){ 2429 (iMenuItem[]){
2430 { open_Icon " Open Link in New Tab", 2430 { openTab_Icon " Open Link in New Tab",
2431 0, 2431 0,
2432 0, 2432 0,
2433 format_CStr("!open newtab:1 url:%s", cstr_String(linkUrl)) }, 2433 format_CStr("!open newtab:1 url:%s", cstr_String(linkUrl)) },
2434 { "Open Link in Background Tab", 2434 { openTabBg_Icon " Open Link in Background Tab",
2435 0, 2435 0,
2436 0, 2436 0,
2437 format_CStr("!open newtab:2 url:%s", cstr_String(linkUrl)) } }, 2437 format_CStr("!open newtab:2 url:%s", cstr_String(linkUrl)) } },
@@ -2440,7 +2440,7 @@ static iBool processEvent_DocumentWidget_(iDocumentWidget *d, const SDL_Event *e
2440 else if (!willUseProxy_App(scheme)) { 2440 else if (!willUseProxy_App(scheme)) {
2441 pushBack_Array( 2441 pushBack_Array(
2442 &items, 2442 &items,
2443 &(iMenuItem){ "Open Link in Default Browser", 2443 &(iMenuItem){ openExt_Icon " Open Link in Default Browser",
2444 0, 2444 0,
2445 0, 2445 0,
2446 format_CStr("!open default:1 url:%s", cstr_String(linkUrl)) }); 2446 format_CStr("!open default:1 url:%s", cstr_String(linkUrl)) });
@@ -2450,7 +2450,7 @@ static iBool processEvent_DocumentWidget_(iDocumentWidget *d, const SDL_Event *e
2450 &items, 2450 &items,
2451 (iMenuItem[]){ 2451 (iMenuItem[]){
2452 { "---", 0, 0, NULL }, 2452 { "---", 0, 0, NULL },
2453 { isGemini ? "Open without Proxy" : "Open Link in Default Browser", 2453 { isGemini ? "Open without Proxy" : openExt_Icon " Open Link in Default Browser",
2454 0, 2454 0,
2455 0, 2455 0,
2456 format_CStr("!open noproxy:1 url:%s", cstr_String(linkUrl)) } }, 2456 format_CStr("!open noproxy:1 url:%s", cstr_String(linkUrl)) } },
diff --git a/src/ui/labelwidget.c b/src/ui/labelwidget.c
index 3ebec790..4de00ec1 100644
--- a/src/ui/labelwidget.c
+++ b/src/ui/labelwidget.c
@@ -204,7 +204,8 @@ static void getColors_LabelWidget_(const iLabelWidget *d, int *bg, int *fg, int
204} 204}
205 205
206iLocalDef int iconPadding_LabelWidget_(const iLabelWidget *d) { 206iLocalDef int iconPadding_LabelWidget_(const iLabelWidget *d) {
207 return d->icon ? iRound(lineHeight_Text(d->font) * 1.5f) : 0; 207 const float amount = flags_Widget(constAs_Widget(d)) & extraPadding_WidgetFlag ? 1.5f : 1.15f;
208 return d->icon ? iRound(lineHeight_Text(d->font) * amount) : 0;
208} 209}
209 210
210static void draw_LabelWidget_(const iLabelWidget *d) { 211static void draw_LabelWidget_(const iLabelWidget *d) {
@@ -244,7 +245,8 @@ static void draw_LabelWidget_(const iLabelWidget *d) {
244 iString str; 245 iString str;
245 initUnicodeN_String(&str, &d->icon, 1); 246 initUnicodeN_String(&str, &d->icon, 1);
246 drawCentered_Text(d->font, 247 drawCentered_Text(d->font,
247 (iRect){ addX_I2(add_I2(bounds.pos, padding_(flags)), -2 * gap_UI), 248 (iRect){ addX_I2(add_I2(bounds.pos, padding_(flags)),
249 (flags & extraPadding_WidgetFlag ? -2 : -1) * gap_UI),
248 init_I2(iconPad, lineHeight_Text(d->font)) }, 250 init_I2(iconPad, lineHeight_Text(d->font)) },
249 iTrue, 251 iTrue,
250 startsWith_String(&d->label, uiTextCaution_ColorEscape) 252 startsWith_String(&d->label, uiTextCaution_ColorEscape)
diff --git a/src/ui/sidebarwidget.c b/src/ui/sidebarwidget.c
index abeeb2b9..2a6b68e2 100644
--- a/src/ui/sidebarwidget.c
+++ b/src/ui/sidebarwidget.c
@@ -197,13 +197,13 @@ static void updateItems_SidebarWidget_(iSidebarWidget *d) {
197 } 197 }
198 d->menu = makeMenu_Widget( 198 d->menu = makeMenu_Widget(
199 as_Widget(d), 199 as_Widget(d),
200 (iMenuItem[]){ { open_Icon " Open Entry in New Tab", 0, 0, "feed.entry.opentab" }, 200 (iMenuItem[]){ { openTab_Icon " Open Entry in New Tab", 0, 0, "feed.entry.opentab" },
201 { "Mark as Read", 0, 0, "feed.entry.toggleread" }, 201 { circle_Icon " Mark as Read", 0, 0, "feed.entry.toggleread" },
202 { pin_Icon " Add Bookmark...", 0, 0, "feed.entry.bookmark" }, 202 { pin_Icon " Add Bookmark...", 0, 0, "feed.entry.bookmark" },
203 { "---", 0, 0, NULL }, 203 { "---", 0, 0, NULL },
204 { "Open Feed Page", 0, 0, "feed.entry.openfeed" }, 204 { page_Icon " Open Feed Page", 0, 0, "feed.entry.openfeed" },
205 { edit_Icon " Edit Feed...", 0, 0, "feed.entry.edit" }, 205 { edit_Icon " Edit Feed...", 0, 0, "feed.entry.edit" },
206 { star_Icon " " uiTextCaution_ColorEscape "Unsubscribe...", 0, 0, "feed.entry.unsubscribe" }, 206 { whiteStar_Icon " " uiTextCaution_ColorEscape "Unsubscribe...", 0, 0, "feed.entry.unsubscribe" },
207 { "---", 0, 0, NULL }, 207 { "---", 0, 0, NULL },
208 { check_Icon " Mark All as Read", SDLK_a, KMOD_SHIFT, "feeds.markallread" }, 208 { check_Icon " Mark All as Read", SDLK_a, KMOD_SHIFT, "feeds.markallread" },
209 { reload_Icon " Refresh Feeds", SDLK_r, KMOD_PRIMARY | KMOD_SHIFT, "feeds.refresh" } }, 209 { reload_Icon " Refresh Feeds", SDLK_r, KMOD_PRIMARY | KMOD_SHIFT, "feeds.refresh" } },
@@ -256,8 +256,8 @@ static void updateItems_SidebarWidget_(iSidebarWidget *d) {
256 } 256 }
257 d->menu = makeMenu_Widget( 257 d->menu = makeMenu_Widget(
258 as_Widget(d), 258 as_Widget(d),
259 (iMenuItem[]){ { open_Icon " Open in New Tab", 0, 0, "bookmark.open newtab:1" }, 259 (iMenuItem[]){ { openTab_Icon " Open in New Tab", 0, 0, "bookmark.open newtab:1" },
260 { "Open in Background Tab", 0, 0, "bookmark.open newtab:2" }, 260 { openTabBg_Icon " Open in Background Tab", 0, 0, "bookmark.open newtab:2" },
261 { "---", 0, 0, NULL }, 261 { "---", 0, 0, NULL },
262 { edit_Icon " Edit...", 0, 0, "bookmark.edit" }, 262 { edit_Icon " Edit...", 0, 0, "bookmark.edit" },
263 { copy_Icon " Duplicate...", 0, 0, "bookmark.dup" }, 263 { copy_Icon " Duplicate...", 0, 0, "bookmark.dup" },
@@ -319,7 +319,7 @@ static void updateItems_SidebarWidget_(iSidebarWidget *d) {
319 { "Copy URL", 0, 0, "history.copy" }, 319 { "Copy URL", 0, 0, "history.copy" },
320 { pin_Icon " Add Bookmark...", 0, 0, "history.addbookmark" }, 320 { pin_Icon " Add Bookmark...", 0, 0, "history.addbookmark" },
321 { "---", 0, 0, NULL }, 321 { "---", 0, 0, NULL },
322 { "Forget URL", 0, 0, "history.delete" }, 322 { close_Icon " Forget URL", 0, 0, "history.delete" },
323 { "---", 0, 0, NULL }, 323 { "---", 0, 0, NULL },
324 { delete_Icon " " uiTextCaution_ColorEscape "Clear History...", 0, 0, "history.clear confirm:1" }, 324 { delete_Icon " " uiTextCaution_ColorEscape "Clear History...", 0, 0, "history.clear confirm:1" },
325 }, 6); 325 }, 6);
@@ -454,7 +454,7 @@ static const char *normalModeLabels_[max_SidebarMode] = {
454 star_Icon " Feeds", 454 star_Icon " Feeds",
455 clock_Icon " History", 455 clock_Icon " History",
456 person_Icon " Identities", 456 person_Icon " Identities",
457 "\U0001f5b9 Outline", 457 page_Icon " Outline",
458}; 458};
459 459
460static const char *tightModeLabels_[max_SidebarMode] = { 460static const char *tightModeLabels_[max_SidebarMode] = {
@@ -462,7 +462,7 @@ static const char *tightModeLabels_[max_SidebarMode] = {
462 star_Icon, 462 star_Icon,
463 clock_Icon, 463 clock_Icon,
464 person_Icon, 464 person_Icon,
465 "\U0001f5b9", 465 page_Icon,
466}; 466};
467 467
468const char *icon_SidebarMode(enum iSidebarMode mode) { 468const char *icon_SidebarMode(enum iSidebarMode mode) {
@@ -1187,8 +1187,11 @@ static iBool processEvent_SidebarWidget_(iSidebarWidget *d, const SDL_Event *ev)
1187 } 1187 }
1188 else if (d->mode == feeds_SidebarMode && d->contextItem) { 1188 else if (d->mode == feeds_SidebarMode && d->contextItem) {
1189 iLabelWidget *menuItem = findMenuItem_Widget(d->menu, "feed.entry.toggleread"); 1189 iLabelWidget *menuItem = findMenuItem_Widget(d->menu, "feed.entry.toggleread");
1190 const iBool isRead = d->contextItem->indent == 0; 1190 const iBool isRead = d->contextItem->indent == 0;
1191 setTextCStr_LabelWidget(menuItem, isRead ? "Mark as Unread" : "Mark as Read"); 1191 setTextCStr_LabelWidget(menuItem,
1192 isRead ? circle_Icon " Mark as Unread"
1193 : circleWhite_Icon " Mark as Read");
1194 checkIcon_LabelWidget(menuItem);
1192 } 1195 }
1193 else if (d->mode == identities_SidebarMode) { 1196 else if (d->mode == identities_SidebarMode) {
1194 const iGmIdentity *ident = constHoverIdentity_SidebarWidget_(d); 1197 const iGmIdentity *ident = constHoverIdentity_SidebarWidget_(d);