Skip to content

Commit

Permalink
补充
Browse files Browse the repository at this point in the history
  • Loading branch information
zetaloop committed Sep 4, 2024
1 parent dffeaf1 commit d900a76
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 18 deletions.
16 changes: 10 additions & 6 deletions lib/providers/key_event.dart
Original file line number Diff line number Diff line change
Expand Up @@ -64,14 +64,18 @@ enum VisualizationHistoryMode {

// keycap animation style
enum KeyCapAnimationType {
none,
fade,
wham,
grow,
slide;
none("无"),
fade("淡入"),
wham("聚焦"),
grow("放大"),
slide("滑动");

const KeyCapAnimationType(this.label);
final String label;

@override
String toString() => name.capitalize();
// String toString() => name.capitalize();
String toString() => label;
}

extension on MouseEvent {
Expand Down
12 changes: 3 additions & 9 deletions lib/providers/key_style.dart
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ enum TextCap {

// modifier text length
enum ModifierTextLength {
iconOnly("图标"),
shortLength("缩写"),
fullLength("全称");
iconOnly("仅图标"),
shortLength("缩写名"),
fullLength("完整名");

const ModifierTextLength(this.label);
final String label;
Expand All @@ -57,9 +57,6 @@ enum VerticalAlignment {
const VerticalAlignment(this.iconName, this.label);
final String iconName;
final String label;

@override
String toString() => label;
}

// alignment in horizontal axis
Expand All @@ -71,9 +68,6 @@ enum HorizontalAlignment {
const HorizontalAlignment(this.iconName, this.label);
final String iconName;
final String label;

@override
String toString() => label;
}

// mouse animation type
Expand Down
2 changes: 1 addition & 1 deletion lib/windows/settings/views/general.dart
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ class GeneralTabView extends StatelessWidget {
PanelItem(
asRow: false,
title: "可视化开关快捷键",
subtitle: "按下快捷键可以切换按键可视化功能的开启关闭",
subtitle: "按下这个快捷键来切换按键可视化的开启关闭",
action: HotkeyInput(
initialValue: context.keyEvent.keyvizToggleShortcut,
onChanged: (value) => context.keyEvent.keyvizToggleShortcut = value,
Expand Down
6 changes: 4 additions & 2 deletions lib/windows/settings/views/style/layout.dart
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ class LayoutView extends StatelessWidget {
builder: (context, verticalAlignment, _) {
return XIconButton(
icon: value.iconName,
tooltip: value.name,
// tooltip: value.name,
tooltip: value.label,
onTap: () {
context.keyStyle.verticalAlignment = value;
},
Expand Down Expand Up @@ -62,7 +63,8 @@ class LayoutView extends StatelessWidget {
builder: (context, horizontalAlignment, _) {
return XIconButton(
icon: value.iconName,
tooltip: value.name,
// tooltip: value.name,
tooltip: value.label,
onTap: () {
context.keyStyle.horizontalAlignment = value;
},
Expand Down

0 comments on commit d900a76

Please sign in to comment.