Skip to content

Commit

Permalink
🌌 add space icon
Browse files Browse the repository at this point in the history
  • Loading branch information
mulaRahul authored Sep 17, 2024
1 parent 99f9660 commit 6a0d014
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 7 deletions.
12 changes: 6 additions & 6 deletions lib/providers/key_style.dart
Original file line number Diff line number Diff line change
Expand Up @@ -446,12 +446,12 @@ class KeyStyleProvider extends ChangeNotifier {
switch (value) {
case KeyCapStyle.minimal:
_backgroundColor = Colors.black;
_fontColor = Colors.white;
_fontColor = _separatorColor = Colors.white;
_addPlusSeparator = true;
break;

case KeyCapStyle.flat:
_fontColor = Colors.black;
_fontColor = _separatorColor = Colors.black;

_primaryColor1 = Colors.white;
_primaryColor2 = const Color(0xfff2f2f2);
Expand All @@ -466,7 +466,7 @@ class KeyStyleProvider extends ChangeNotifier {
_primaryColor1 = Colors.white;
_secondaryColor1 = _mSecondaryColor1 = Colors.black;
_borderColor = _mBorderColor = Colors.black;
_fontColor = _mFontColor = Colors.black;
_fontColor = _separatorColor = _mFontColor = Colors.black;
_isGradient = false;

_mPrimaryColor1 = const Color(0xff3A86FF);
Expand Down Expand Up @@ -504,7 +504,7 @@ class KeyStyleProvider extends ChangeNotifier {
_cornerSmoothing = .8;
_primaryColor1 = const Color(0xff333f4d);
_secondaryColor1 = const Color(0xff212932);
_fontColor = const Color(0xffff9b00);
_fontColor = _separatorColor = const Color(0xffff9b00);

_mPrimaryColor1 = const Color(0xfff08200);
_mSecondaryColor1 = const Color(0xffff8a00);
Expand Down Expand Up @@ -753,7 +753,7 @@ class KeyStyleProvider extends ChangeNotifier {

_fontSize = data[_JsonKeys.fontSize] ?? _Defaults.fontSize;

_fontColor = HexColor.fromHex(
_fontColor = _separatorColor = HexColor.fromHex(
data[_JsonKeys.fontColor] ?? "000000",
);
_mFontColor = HexColor.fromHex(
Expand Down Expand Up @@ -925,7 +925,7 @@ class KeyStyleProvider extends ChangeNotifier {
_keyCapStyle = _Defaults.keyCapStyle;
_fontSize = _Defaults.fontSize;
_fontColor = _Defaults.fontColor;
_mFontColor = _Defaults.mFontColor;
_fontColor = _separatorColor = _Defaults.mFontColor;
_textCap = _Defaults.textCap;
_modifierTextLength = _Defaults.modifierTextLength;
_verticalAlignment = _Defaults.verticalAlignment;
Expand Down
1 change: 0 additions & 1 deletion lib/windows/key_visualizer/widgets/keycaps/keycap.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import 'package:flutter/services.dart';
import 'package:flutter/widgets.dart';
import 'package:provider/provider.dart';

Expand Down
13 changes: 13 additions & 0 deletions lib/windows/key_visualizer/widgets/keycaps/keycap_content.dart
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,19 @@ class KeyCapContent extends StatelessWidget {
);
// spacebar
if (event.isSpacebar) {
if (icon != null) {
return Padding(
padding: EdgeInsets.symmetric(horizontal: style.fontSize * 2),
child: SizedBox.square(
dimension: style.fontSize * .8,
child: SvgIcon(
icon: icon,
color: fontColor,
size: style.fontSize * .8,
),
),
);
}
String spaceLabel = 'space';

if (style.textCap == TextCap.capitalize) {
Expand Down

0 comments on commit 6a0d014

Please sign in to comment.