File tree Expand file tree Collapse file tree 1 file changed +13
-2
lines changed
Telegram/SourceFiles/settings Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -112,6 +112,17 @@ struct Labeled {
112
112
};
113
113
}
114
114
115
+ [[nodiscard]] QString ToString (const QKeySequence &key) {
116
+ auto result = key.toString ();
117
+ #ifdef Q_OS_MAC
118
+ result = result.replace (u" Ctrl+" _q, QString () + QChar (0x2318 ));
119
+ result = result.replace (u" Meta+" _q, QString () + QChar (0x2303 ));
120
+ result = result.replace (u" Alt+" _q, QString () + QChar (0x2325 ));
121
+ result = result.replace (u" Shift+" _q, QString () + QChar (0x21E7 ));
122
+ #endif // Q_OS_MAC
123
+ return result;
124
+ }
125
+
115
126
[[nodiscard]] Fn<void ()> SetupShortcutsContent (
116
127
not_null<Window::SessionController*> controller,
117
128
not_null<Ui::VerticalLayout*> content) {
@@ -233,9 +244,9 @@ struct Labeled {
233
244
? TextWithEntities ()
234
245
: removed
235
246
? Ui::Text::Wrapped (
236
- TextWithEntities{ key. toString ( ) },
247
+ TextWithEntities{ ToString (key ) },
237
248
EntityType::StrikeOut)
238
- : TextWithEntities{ key. toString ( ) });
249
+ : TextWithEntities{ ToString (key ) });
239
250
keys->setTextColorOverride ((recording == raw)
240
251
? st::boxTextFgGood->c
241
252
: removed
You can’t perform that action at this time.
0 commit comments