Skip to content

Commit 186dda1

Browse files
committed
修改暗色模式禁用色失效的问题
1 parent a2cc7fc commit 186dda1

19 files changed

Lines changed: 28 additions & 28 deletions

File tree

tdesign-component/example/lib/page/td_input_page.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -513,7 +513,7 @@ class _TDInputViewPageState extends State<TDInputViewPage> {
513513
_countdownTime > 0
514514
? TDText(
515515
'${countDownText}(${_countdownTime}秒)',
516-
textColor: TDTheme.of(context).textColorDisabled,
516+
textColor: TDTheme.of(context).textDisabledColor,
517517
)
518518
: TDText(confirmText,
519519
textColor: TDTheme.of(context).brandNormalColor),

tdesign-component/lib/src/components/action_sheet/td_action_sheet_list.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ class TDActionSheetList extends StatelessWidget {
121121
data: IconThemeData(
122122
color: item.disabled
123123
// 禁用状态下的图标颜色
124-
? TDTheme.of(context).textColorDisabled
124+
? TDTheme.of(context).textDisabledColor
125125
: (item.textStyle?.color ??
126126
// 正常状态下的图标颜色
127127
TDTheme.of(context).textColorPrimary),
@@ -139,7 +139,7 @@ class TDActionSheetList extends StatelessWidget {
139139
item.label,
140140
font: TDTheme.of(context).fontBodyLarge,
141141
textColor: item.disabled
142-
? TDTheme.of(context).textColorDisabled // 禁用状态下的文本颜色
142+
? TDTheme.of(context).textDisabledColor // 禁用状态下的文本颜色
143143
: TDTheme.of(context).textColorPrimary, // 正常状态下的文本颜色
144144
style: item.textStyle,
145145
),

tdesign-component/lib/src/components/button/td_button_style.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ class TDButtonStyle {
190190
case TDButtonStatus.active:
191191
return TDTheme.of(context).textColorPrimary;
192192
case TDButtonStatus.disable:
193-
return TDTheme.of(context).textColorDisabled;
193+
return TDTheme.of(context).textDisabledColor;
194194
}
195195
}
196196

tdesign-component/lib/src/components/calendar/td_calendar_style.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,12 +113,12 @@ class TDCalendarStyle {
113113
break;
114114
case DateSelectType.disabled:
115115
cellStyle =
116-
defStyle.copyWith(color: TDTheme.of(context).textColorDisabled);
116+
defStyle.copyWith(color: TDTheme.of(context).textDisabledColor);
117117
todayStyle = defStyle.copyWith(color: TDTheme.of(context).brandDisabledColor);
118118
cellPrefixStyle =
119119
prefixStyle.copyWith(color: TDTheme.of(context).errorDisabledColor);
120120
cellSuffixStyle =
121-
prefixStyle.copyWith(color: TDTheme.of(context).textColorDisabled);
121+
prefixStyle.copyWith(color: TDTheme.of(context).textDisabledColor);
122122
cellDecoration = null;
123123
break;
124124
case DateSelectType.selected:

tdesign-component/lib/src/components/checkbox/td_check_box.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ class TDCheckboxState extends State<TDCheckbox> {
309309
textColor: widget.enable
310310
? (widget.subTitleColor ??
311311
TDTheme.of(context).textColorPlaceholder)
312-
: TDTheme.of(context).textColorDisabled,
312+
: TDTheme.of(context).textDisabledColor,
313313
font: TDTheme.of(context).fontBodyMedium),
314314
),
315315
)
@@ -367,7 +367,7 @@ class TDCheckboxState extends State<TDCheckbox> {
367367
textColor: widget.enable
368368
? (widget.subTitleColor ??
369369
TDTheme.of(context).textColorPlaceholder)
370-
: TDTheme.of(context).textColorDisabled,
370+
: TDTheme.of(context).textDisabledColor,
371371
font: widget.subTitleFont ??
372372
TDTheme.of(context).fontBodyMedium),
373373
),
@@ -495,7 +495,7 @@ class TDCheckboxState extends State<TDCheckbox> {
495495
overflow: TextOverflow.ellipsis,
496496
textColor: widget.enable
497497
? (widget.titleColor ?? TDTheme.of(context).textColorPrimary)
498-
: TDTheme.of(context).textColorDisabled,
498+
: TDTheme.of(context).textDisabledColor,
499499
font: widget.titleFont ??
500500
TDTheme.of(context)
501501
.fontBodyLarge); // TODO custom fontSize https://github.com/Tencent/tdesign-flutter/issues/66

tdesign-component/lib/src/components/dropdown_menu/td_dropdown_item.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,7 @@ class _TDDropdownItemState extends State<TDDropdownItem> {
317317
? checked
318318
? TDTheme.of(context).brandColor7
319319
: TDTheme.of(context).textColorPrimary
320-
: TDTheme.of(context).textColorDisabled,
320+
: TDTheme.of(context).textDisabledColor,
321321
),
322322
),
323323
),

tdesign-component/lib/src/components/dropdown_menu/td_dropdown_menu.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ class _TDDropdownMenuState extends State<TDDropdownMenu>
201201

202202
Widget _tabBarContent(int index) {
203203
final color = _disabled(index)
204-
? TDTheme.of(context).textColorDisabled
204+
? TDTheme.of(context).textDisabledColor
205205
: _isOpened[index]
206206
? TDTheme.of(context).brandNormalColor
207207
: TDTheme.of(context).textColorPrimary;

tdesign-component/lib/src/components/link/td_link.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ class TDLink extends StatelessWidget {
153153
TDLinkStyle.danger: theme.errorDisabledColor,
154154
TDLinkStyle.warning: theme.warningDisabledColor,
155155
TDLinkStyle.success: theme.successDisabledColor,
156-
TDLinkStyle.defaultStyle: theme.textColorDisabled,
156+
TDLinkStyle.defaultStyle: theme.textDisabledColor,
157157
},
158158
};
159159

tdesign-component/lib/src/components/picker/td_item_widget.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ class ItemDistanceCalculator {
109109
if (distance < 0.5) {
110110
return TDTheme.of(context).textColorPrimary;
111111
} else {
112-
return TDTheme.of(context).textColorDisabled;
112+
return TDTheme.of(context).textDisabledColor;
113113
}
114114
}
115115

tdesign-component/lib/src/components/rate/td_rate.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,7 @@ class _TDRateState extends State<TDRate> with TickerProviderStateMixin {
385385
? TDTheme.of(context).fontBodyLarge
386386
: TDTheme.of(context).fontTitleMedium,
387387
textColor: notRated
388-
? TDTheme.of(context).textColorDisabled
388+
? TDTheme.of(context).textDisabledColor
389389
: TDTheme.of(context).textColorPrimary,
390390
),
391391
),

0 commit comments

Comments
 (0)