Skip to content

Commit c656da6

Browse files
committed
style fixes
1 parent 894a397 commit c656da6

File tree

9 files changed

+132
-54
lines changed

9 files changed

+132
-54
lines changed

lib/pages/add_wallet_views/restore_wallet_view/restore_options_view/restore_options_view.dart

Lines changed: 40 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -73,43 +73,62 @@ class _RestoreOptionsViewState extends ConsumerState<RestoreOptionsView> {
7373
super.dispose();
7474
}
7575

76-
TextStyle get _datePickerTextStyleBase => GoogleFonts.inter(
77-
color: baseColor,
78-
fontSize: 12,
79-
fontWeight: FontWeight.w400,
80-
letterSpacing: 0.5,
81-
);
8276
MaterialRoundedDatePickerStyle _buildDatePickerStyle() {
8377
return MaterialRoundedDatePickerStyle(
8478
paddingMonthHeader: const EdgeInsets.only(top: 11),
8579
colorArrowNext: Theme.of(context).extension<StackColors>()!.textSubtitle1,
8680
colorArrowPrevious:
8781
Theme.of(context).extension<StackColors>()!.textSubtitle1,
88-
textStyleButtonNegative: _datePickerTextStyleBase.copyWith(
89-
fontSize: 16, fontWeight: FontWeight.w600),
90-
textStyleButtonPositive: _datePickerTextStyleBase.copyWith(
91-
fontSize: 16, fontWeight: FontWeight.w600),
92-
textStyleCurrentDayOnCalendar: _datePickerTextStyleBase.copyWith(
82+
textStyleButtonNegative: GoogleFonts.inter(
83+
color: baseColor,
84+
letterSpacing: 0.5,
85+
fontSize: 16,
86+
fontWeight: FontWeight.w600,
87+
),
88+
textStyleButtonPositive: GoogleFonts.inter(
89+
color: baseColor,
90+
letterSpacing: 0.5,
91+
fontSize: 16,
92+
fontWeight: FontWeight.w600,
93+
),
94+
textStyleCurrentDayOnCalendar: GoogleFonts.inter(
95+
fontSize: 12,
96+
fontWeight: FontWeight.w400,
97+
letterSpacing: 0.5,
9398
color: Theme.of(context).extension<StackColors>()!.accentColorDark,
9499
),
95-
textStyleDayHeader: _datePickerTextStyleBase.copyWith(
100+
textStyleDayHeader: GoogleFonts.inter(
101+
letterSpacing: 0.5,
96102
color: Theme.of(context).extension<StackColors>()!.accentColorDark,
97103
fontSize: 16,
98104
fontWeight: FontWeight.w600,
99105
),
100-
textStyleDayOnCalendar: _datePickerTextStyleBase,
101-
textStyleDayOnCalendarDisabled: _datePickerTextStyleBase.copyWith(
106+
textStyleDayOnCalendar: GoogleFonts.inter(
107+
color: baseColor,
108+
fontSize: 12,
109+
fontWeight: FontWeight.w400,
110+
letterSpacing: 0.5,
111+
),
112+
textStyleDayOnCalendarDisabled: GoogleFonts.inter(
113+
fontSize: 12,
114+
fontWeight: FontWeight.w400,
115+
letterSpacing: 0.5,
102116
color: Theme.of(context).extension<StackColors>()!.textSubtitle3,
103117
),
104-
textStyleDayOnCalendarSelected: _datePickerTextStyleBase.copyWith(
118+
textStyleDayOnCalendarSelected: GoogleFonts.inter(
119+
fontSize: 12,
120+
fontWeight: FontWeight.w400,
121+
letterSpacing: 0.5,
105122
color: Theme.of(context).extension<StackColors>()!.popupBG,
106123
),
107-
textStyleMonthYearHeader: _datePickerTextStyleBase.copyWith(
124+
textStyleMonthYearHeader: GoogleFonts.inter(
125+
letterSpacing: 0.5,
108126
color: Theme.of(context).extension<StackColors>()!.textSubtitle1,
109127
fontSize: 16,
110128
fontWeight: FontWeight.w600,
111129
),
112-
textStyleYearButton: _datePickerTextStyleBase.copyWith(
130+
textStyleYearButton: GoogleFonts.inter(
131+
letterSpacing: 0.5,
113132
color: Theme.of(context).extension<StackColors>()!.textWhite,
114133
fontSize: 16,
115134
fontWeight: FontWeight.w600,
@@ -120,12 +139,14 @@ class _RestoreOptionsViewState extends ConsumerState<RestoreOptionsView> {
120139

121140
MaterialRoundedYearPickerStyle _buildYearPickerStyle() {
122141
return MaterialRoundedYearPickerStyle(
123-
textStyleYear: _datePickerTextStyleBase.copyWith(
142+
textStyleYear: GoogleFonts.inter(
143+
letterSpacing: 0.5,
124144
color: Theme.of(context).extension<StackColors>()!.textSubtitle2,
125145
fontWeight: FontWeight.w600,
126146
fontSize: 16,
127147
),
128-
textStyleYearSelected: _datePickerTextStyleBase.copyWith(
148+
textStyleYearSelected: GoogleFonts.inter(
149+
letterSpacing: 0.5,
129150
color: Theme.of(context).extension<StackColors>()!.accentColorDark,
130151
fontWeight: FontWeight.w600,
131152
fontSize: 18,

lib/pages/exchange_view/exchange_step_views/step_4_view.dart

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -178,11 +178,10 @@ class _Step4ViewState extends ConsumerState<Step4View> {
178178
text: TextSpan(
179179
text:
180180
"You must send at least ${model.sendAmount.toString()} ${model.sendTicker}. ",
181-
style: STextStyles.label(context).copyWith(
181+
style: STextStyles.label700(context).copyWith(
182182
color: Theme.of(context)
183183
.extension<StackColors>()!
184184
.warningForeground,
185-
fontWeight: FontWeight.w700,
186185
),
187186
children: [
188187
TextSpan(
@@ -192,7 +191,6 @@ class _Step4ViewState extends ConsumerState<Step4View> {
192191
color: Theme.of(context)
193192
.extension<StackColors>()!
194193
.warningForeground,
195-
fontWeight: FontWeight.w500,
196194
),
197195
),
198196
],

lib/pages/exchange_view/exchange_view.dart

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -379,6 +379,11 @@ class _ExchangeViewState extends ConsumerState<ExchangeView> {
379379
height: 4,
380380
),
381381
TextFormField(
382+
style: STextStyles.smallMed14(context).copyWith(
383+
color: Theme.of(context)
384+
.extension<StackColors>()!
385+
.textDark,
386+
),
382387
focusNode: _sendFocusNode,
383388
controller: _sendController,
384389
textAlign: TextAlign.right,
@@ -720,6 +725,11 @@ class _ExchangeViewState extends ConsumerState<ExchangeView> {
720725
height: 4,
721726
),
722727
TextFormField(
728+
style: STextStyles.smallMed14(context).copyWith(
729+
color: Theme.of(context)
730+
.extension<StackColors>()!
731+
.textDark,
732+
),
723733
focusNode: _receiveFocusNode,
724734
controller: _receiveController,
725735
readOnly: ref

lib/pages/exchange_view/trade_details_view.dart

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -249,11 +249,10 @@ class _TradeDetailsViewState extends ConsumerState<TradeDetailsView> {
249249
"You must send at least ${sendAmount.toStringAsFixed(
250250
trade.fromCurrency.toLowerCase() == "xmr" ? 12 : 8,
251251
)} ${trade.fromCurrency.toUpperCase()}. ",
252-
style: STextStyles.label(context).copyWith(
252+
style: STextStyles.label700(context).copyWith(
253253
color: Theme.of(context)
254254
.extension<StackColors>()!
255255
.warningForeground,
256-
fontWeight: FontWeight.w700,
257256
),
258257
children: [
259258
TextSpan(
@@ -267,7 +266,6 @@ class _TradeDetailsViewState extends ConsumerState<TradeDetailsView> {
267266
color: Theme.of(context)
268267
.extension<StackColors>()!
269268
.warningForeground,
270-
fontWeight: FontWeight.w500,
271269
),
272270
),
273271
]),

lib/pages/exchange_view/wallet_initiated_exchange_view.dart

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -424,6 +424,11 @@ class _WalletInitiatedExchangeViewState
424424
height: 4,
425425
),
426426
TextFormField(
427+
style: STextStyles.smallMed14(context).copyWith(
428+
color: Theme.of(context)
429+
.extension<StackColors>()!
430+
.textDark,
431+
),
427432
focusNode: _sendFocusNode,
428433
controller: _sendController,
429434
textAlign: TextAlign.right,
@@ -762,6 +767,9 @@ class _WalletInitiatedExchangeViewState
762767
Assets.svg.swap,
763768
width: 20,
764769
height: 20,
770+
color: Theme.of(context)
771+
.extension<StackColors>()!
772+
.accentColorDark,
765773
),
766774
),
767775
),
@@ -788,6 +796,11 @@ class _WalletInitiatedExchangeViewState
788796
height: 4,
789797
),
790798
TextFormField(
799+
style: STextStyles.smallMed14(context).copyWith(
800+
color: Theme.of(context)
801+
.extension<StackColors>()!
802+
.textDark,
803+
),
791804
focusNode: _receiveFocusNode,
792805
controller: _receiveController,
793806
readOnly: ref

lib/pages/send_view/send_view.dart

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -523,11 +523,11 @@ class _SendViewState extends ConsumerState<SendView> {
523523
locale: locale,
524524
decimalPlaces: 2,
525525
)} ${ref.watch(prefsChangeNotifierProvider.select((value) => value.currency))}",
526-
style: STextStyles.titleBold12(
527-
context)
528-
.copyWith(
526+
style:
527+
STextStyles.titleBold12_400(
528+
context)
529+
.copyWith(
529530
fontSize: 8,
530-
fontWeight: FontWeight.w400,
531531
),
532532
textAlign: TextAlign.right,
533533
)

lib/pages/wallet_view/transaction_views/transaction_search_filter_view.dart

Lines changed: 42 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -114,13 +114,6 @@ class _TransactionSearchViewState
114114
var _selectedFromDate = DateTime(2007);
115115
var _selectedToDate = DateTime.now();
116116

117-
TextStyle get _datePickerTextStyleBase => GoogleFonts.inter(
118-
color: baseColor,
119-
fontSize: 12,
120-
fontWeight: FontWeight.w400,
121-
letterSpacing: 0.5,
122-
);
123-
124117
MaterialRoundedDatePickerStyle _buildDatePickerStyle() {
125118
return MaterialRoundedDatePickerStyle(
126119
backgroundPicker: Theme.of(context).extension<StackColors>()!.popupBG,
@@ -129,30 +122,56 @@ class _TransactionSearchViewState
129122
colorArrowNext: Theme.of(context).extension<StackColors>()!.textSubtitle1,
130123
colorArrowPrevious:
131124
Theme.of(context).extension<StackColors>()!.textSubtitle1,
132-
textStyleButtonNegative: _datePickerTextStyleBase.copyWith(
133-
fontSize: 16, fontWeight: FontWeight.w600),
134-
textStyleButtonPositive: _datePickerTextStyleBase.copyWith(
135-
fontSize: 16, fontWeight: FontWeight.w600),
136-
textStyleCurrentDayOnCalendar: _datePickerTextStyleBase.copyWith(
137-
color: Theme.of(context).extension<StackColors>()!.accentColorDark),
138-
textStyleDayHeader: _datePickerTextStyleBase.copyWith(
125+
textStyleButtonNegative: GoogleFonts.inter(
126+
letterSpacing: 0.5,
127+
color: baseColor,
128+
fontSize: 16,
129+
fontWeight: FontWeight.w600,
130+
),
131+
textStyleButtonPositive: GoogleFonts.inter(
132+
letterSpacing: 0.5,
133+
color: baseColor,
134+
fontSize: 16,
135+
fontWeight: FontWeight.w600,
136+
),
137+
textStyleCurrentDayOnCalendar: GoogleFonts.inter(
138+
letterSpacing: 0.5,
139+
color: Theme.of(context).extension<StackColors>()!.accentColorDark,
140+
fontWeight: FontWeight.w400,
141+
fontSize: 12,
142+
),
143+
textStyleDayHeader: GoogleFonts.inter(
144+
letterSpacing: 0.5,
139145
color: Theme.of(context).extension<StackColors>()!.accentColorDark,
140146
fontSize: 16,
141147
fontWeight: FontWeight.w600,
142148
),
143-
textStyleDayOnCalendar: _datePickerTextStyleBase,
144-
textStyleDayOnCalendarDisabled: _datePickerTextStyleBase.copyWith(
149+
textStyleDayOnCalendar: GoogleFonts.inter(
150+
letterSpacing: 0.5,
151+
color: baseColor,
152+
fontSize: 12,
153+
fontWeight: FontWeight.w400,
154+
),
155+
textStyleDayOnCalendarDisabled: GoogleFonts.inter(
156+
letterSpacing: 0.5,
145157
color: Theme.of(context).extension<StackColors>()!.textSubtitle3,
158+
fontWeight: FontWeight.w400,
159+
fontSize: 12,
146160
),
147-
textStyleDayOnCalendarSelected: _datePickerTextStyleBase.copyWith(
161+
textStyleDayOnCalendarSelected: GoogleFonts.inter(
162+
letterSpacing: 0.5,
148163
color: Theme.of(context).extension<StackColors>()!.textWhite,
164+
fontWeight: FontWeight.w400,
165+
fontSize: 12,
149166
),
150-
textStyleMonthYearHeader: _datePickerTextStyleBase.copyWith(
167+
textStyleMonthYearHeader: GoogleFonts.inter(
168+
letterSpacing: 0.5,
151169
color: Theme.of(context).extension<StackColors>()!.textSubtitle1,
152170
fontSize: 16,
153171
fontWeight: FontWeight.w600,
154172
),
155-
textStyleYearButton: _datePickerTextStyleBase.copyWith(
173+
textStyleYearButton: GoogleFonts.inter(
174+
letterSpacing: 0.5,
156175
color: Theme.of(context).extension<StackColors>()!.textWhite,
157176
fontSize: 16,
158177
fontWeight: FontWeight.w600,
@@ -164,12 +183,14 @@ class _TransactionSearchViewState
164183
MaterialRoundedYearPickerStyle _buildYearPickerStyle() {
165184
return MaterialRoundedYearPickerStyle(
166185
backgroundPicker: Theme.of(context).extension<StackColors>()!.popupBG,
167-
textStyleYear: _datePickerTextStyleBase.copyWith(
186+
textStyleYear: GoogleFonts.inter(
187+
letterSpacing: 0.5,
168188
color: Theme.of(context).extension<StackColors>()!.textSubtitle2,
169189
fontWeight: FontWeight.w600,
170190
fontSize: 16,
171191
),
172-
textStyleYearSelected: _datePickerTextStyleBase.copyWith(
192+
textStyleYearSelected: GoogleFonts.inter(
193+
letterSpacing: 0.5,
173194
color: Theme.of(context).extension<StackColors>()!.accentColorDark,
174195
fontWeight: FontWeight.w600,
175196
fontSize: 18,

lib/utilities/text_styles.dart

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,12 @@ class STextStyles {
2727
fontSize: 16,
2828
);
2929

30+
static TextStyle titleBold12_400(BuildContext context) => GoogleFonts.inter(
31+
color: Theme.of(context).extension<StackColors>()!.textDark,
32+
fontWeight: FontWeight.w400,
33+
fontSize: 16,
34+
);
35+
3036
static TextStyle subtitle(BuildContext context) => GoogleFonts.inter(
3137
color: Theme.of(context).extension<StackColors>()!.textDark,
3238
fontWeight: FontWeight.w400,
@@ -75,6 +81,12 @@ class STextStyles {
7581
fontSize: 12,
7682
);
7783

84+
static TextStyle label700(BuildContext context) => GoogleFonts.inter(
85+
color: Theme.of(context).extension<StackColors>()!.textSubtitle1,
86+
fontWeight: FontWeight.w700,
87+
fontSize: 12,
88+
);
89+
7890
static TextStyle itemSubtitle(BuildContext context) => GoogleFonts.inter(
7991
color: Theme.of(context).extension<StackColors>()!.infoItemLabel,
8092
fontWeight: FontWeight.w500,
@@ -87,6 +99,13 @@ class STextStyles {
8799
fontSize: 14,
88100
);
89101

102+
static TextStyle itemSubtitle12_600(BuildContext context) =>
103+
GoogleFonts.inter(
104+
color: Theme.of(context).extension<StackColors>()!.textDark,
105+
fontWeight: FontWeight.w500,
106+
fontSize: 14,
107+
);
108+
90109
static TextStyle fieldLabel(BuildContext context) => GoogleFonts.inter(
91110
color: Theme.of(context).extension<StackColors>()!.textSubtitle2,
92111
fontWeight: FontWeight.w500,

lib/widgets/transaction_card.dart

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -175,10 +175,8 @@ class _TransactionCardState extends ConsumerState<TransactionCard> {
175175
: _transaction.amount;
176176
return Text(
177177
"${Format.satoshiAmountToPrettyString(amount, locale)} ${coin.ticker}",
178-
style: STextStyles.itemSubtitle12(context)
179-
.copyWith(
180-
fontWeight: FontWeight.w600,
181-
),
178+
style:
179+
STextStyles.itemSubtitle12_600(context),
182180
);
183181
},
184182
),

0 commit comments

Comments
 (0)