Skip to content

Commit faa4832

Browse files
Daniel LangeDaniel Lange
authored andcommitted
Make Dec and Inc consistent on F7 and F8 as per the main panel
* minus and plus keys still work * this prevents the ugly left flush "- " and "+ " key labels * Unicode "-" and "+" are still too hard in 2025, see PR #1613 😭 Closes #1613
1 parent 5954fa0 commit faa4832

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

DisplayOptionsPanel.c

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,11 @@ in the source distribution for its full text.
2222
#include "ScreensPanel.h"
2323

2424

25-
static const char* const DisplayOptionsFunctions[] = {" ", " ", " ", " ", " ", " ", " ", " ", " ", "Done ", NULL};
25+
static const char* const DisplayOptionsFunctions[] = {" ", " ", " ", " ", " ", " ", " ", " ", " ", "Done ", NULL};
2626

27-
static const char* const DisplayOptionsDecIncFunctions[] = {"Dec ", "Inc ", " ", "Done ", NULL};
28-
static const char* const DisplayOptionsDecIncKeys[] = {"- ", "+ ", " ", "F10", NULL};
29-
static const int DisplayOptionsDecIncEvents[] = {'-', '+', ERR, KEY_F(10)};
27+
static const char* const DisplayOptionsDecIncFunctions[] = {" ", " ", " ", " ", " ", " ", "Dec ", "Inc ", " ", "Done ", NULL};
28+
static const char* const DisplayOptionsDecIncKeys[] = {" " , " " , " " , " " , " " , " " , "F7" , "F8" , " " , "F10" , NULL};
29+
static const int DisplayOptionsDecIncEvents[] = {'-', KEY_F(7), '+', KEY_F(8), ERR, KEY_F(10)};
3030

3131
static void DisplayOptionsPanel_delete(Object* object) {
3232
DisplayOptionsPanel* this = (DisplayOptionsPanel*) object;
@@ -66,12 +66,14 @@ static HandlerResult DisplayOptionsPanel_eventHandler(Panel* super, int ch) {
6666
}
6767
break;
6868
case '-':
69+
case KEY_F(7):
6970
if (OptionItem_kind(selected) == OPTION_ITEM_NUMBER) {
7071
NumberItem_decrease((NumberItem*)selected);
7172
result = HANDLED;
7273
}
7374
break;
7475
case '+':
76+
case KEY_F(8):
7577
if (OptionItem_kind(selected) == OPTION_ITEM_NUMBER) {
7678
NumberItem_increase((NumberItem*)selected);
7779
result = HANDLED;

0 commit comments

Comments
 (0)