Skip to content

Commit bd5ae86

Browse files
committed
better menu sort • use of emoji and Unicode
1 parent 9ac62c6 commit bd5ae86

File tree

4 files changed

+15
-18
lines changed

4 files changed

+15
-18
lines changed

Info.plist

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<plist version="1.0">
44
<dict>
55
<key>CFBundleIcon</key>
6-
<string>Icon_512x512.png</string>
6+
<string>monitor.icns</string>
77
<key>CFBundlePackageType</key>
88
<string>APPL</string>
99
<key>CFBundleSignature</key>

ResMenuItem.mm

+12-12
Original file line numberDiff line numberDiff line change
@@ -32,22 +32,22 @@ - (id) initWithDisplay: (CGDirectDisplayID) display andMode: (modes_D4*) mode
3232
{
3333
if(refreshRate)
3434
{
35-
title = [NSString stringWithFormat: @"%d x %d (HiDPI), %.0f Hz", width, height, refreshRate];
35+
title = [NSString stringWithFormat: @"%d × %d ⚡️, %.0f Hz", width, height, refreshRate];
3636
}
3737
else
3838
{
39-
title = [NSString stringWithFormat: @"%d x %d (HiDPI)", width, height];
39+
title = [NSString stringWithFormat: @"%d × %d ⚡️", width, height];
4040
}
4141
}
4242
else
4343
{
4444
if(refreshRate)
4545
{
46-
title = [NSString stringWithFormat: @"%d x %d, %.0f Hz", width, height, refreshRate];
46+
title = [NSString stringWithFormat: @"%d × %d, %.0f Hz", width, height, refreshRate];
4747
}
4848
else
4949
{
50-
title = [NSString stringWithFormat: @"%d x %d", width, height];
50+
title = [NSString stringWithFormat: @"%d × %d", width, height];
5151
}
5252
}
5353
[self setTitle: title];
@@ -67,11 +67,11 @@ - (void) setTextFormat: (int) textFormat
6767
{
6868
if(scale == 2.0f)
6969
{
70-
title = [NSString stringWithFormat: @"%d x %d (HiDPI)", width, height];
70+
title = [NSString stringWithFormat: @"%d × %d ", width, height];
7171
}
7272
else
7373
{
74-
title = [NSString stringWithFormat: @"%d x %d", width, height];
74+
title = [NSString stringWithFormat: @"%d × %d", width, height];
7575
}
7676
}
7777

@@ -124,18 +124,18 @@ - (float) scale
124124
- (NSComparisonResult) compareResMenuItem: (ResMenuItem*) otherItem
125125
{
126126
{
127-
int o_scale = [otherItem scale];
128-
if(scale < o_scale)
127+
int o_width = [otherItem width];
128+
if(width < o_width)
129129
return NSOrderedDescending;
130-
else if(scale > o_scale)
130+
else if(width > o_width)
131131
return NSOrderedAscending;
132132
// return NSOrderedSame;
133133
}
134134
{
135-
int o_width = [otherItem width];
136-
if(width < o_width)
135+
int o_scale = [otherItem scale];
136+
if(scale < o_scale)
137137
return NSOrderedDescending;
138-
else if(width > o_width)
138+
else if(scale > o_scale)
139139
return NSOrderedAscending;
140140
// return NSOrderedSame;
141141
}

SRApplicationDelegate.mm

+2-2
Original file line numberDiff line numberDiff line change
@@ -142,11 +142,11 @@ - (void) refreshStatusMenu
142142
{
143143
if([mainItem scale] == 2.0f)
144144
{
145-
title = [NSString stringWithFormat: @"%d x %d (HiDPI)", [mainItem width], [mainItem height]];
145+
title = [NSString stringWithFormat: @"%d × %d ⚡️️", [mainItem width], [mainItem height]];
146146
}
147147
else
148148
{
149-
title = [NSString stringWithFormat: @"%d x %d", [mainItem width], [mainItem height]];
149+
title = [NSString stringWithFormat: @"%d × %d", [mainItem width], [mainItem height]];
150150
}
151151
}
152152

make

-3
This file was deleted.

0 commit comments

Comments
 (0)