Skip to content
Merged
68 changes: 68 additions & 0 deletions lib/core/iconography.dart
Original file line number Diff line number Diff line change
Expand Up @@ -576,4 +576,72 @@ class KapyIcons {
0xE086,
HugeIcons.strokeRoundedZoomInArea,
);

// The settings dialog's rail and General pane, as Riverbank draws them.
static const paintBoardOutlined = KapyIconData(
0xE0C0,
HugeIcons.strokeRoundedPaintBoard,
);
static const commandOutlined = KapyIconData(
0xE0C1,
HugeIcons.strokeRoundedCommand,
);
static const refreshOutlined = KapyIconData(
0xE0C2,
HugeIcons.strokeRoundedRefresh,
);
static const textCursorOutlined = KapyIconData(
0xE0C3,
HugeIcons.strokeRoundedInputCursorText,
);
static const spellCheckOutlined = KapyIconData(0xE0C4, [
[
'path',
{
'd':
'M5.992 13h9m1 1.857l-2.61-7.033C12.187 4.607 11.59 2.998 10.55 3S8.918 4.612 7.732 7.833L3.993 18m9.999 1.393s1.2.652 1.8 1.607c0 0 1.8-3.75 4.2-5',
'stroke': 'currentColor',
'strokeWidth': '1.5',
'strokeLinecap': 'round',
'strokeLinejoin': 'round',
},
],
]);
static const hashtagOutlined = KapyIconData(
0xE0C5,
HugeIcons.strokeRoundedHashtag,
);
static const uploadOutlined = KapyIconData(
0xE0C6,
HugeIcons.strokeRoundedUpload04,
);
static const lockKeyOutlined = KapyIconData(
0xE0C7,
HugeIcons.strokeRoundedLockKey,
);
static const computerOutlined = KapyIconData(
0xE0C8,
HugeIcons.strokeRoundedComputer,
);
static const panelColumnsOutlined = KapyIconData(0xE0C9, [
[
'path',
{
'd':
'M20.109 3.891C21.5 5.282 21.5 7.521 21.5 12c0 4.478 0 6.718-1.391 8.109S16.479 21.5 12 21.5c-4.478 0-6.718 0-8.109-1.391S2.5 16.479 2.5 12c0-4.478 0-6.718 1.391-8.109S7.521 2.5 12 2.5c4.478 0 6.718 0 8.109 1.391',
'stroke': 'currentColor',
'strokeWidth': '1.5',
'strokeLinecap': 'round',
'strokeLinejoin': 'round',
},
],
[
'path',
{
'd': 'M8.5 2.5v19m7-19v19',
'stroke': 'currentColor',
'strokeWidth': '1.5',
},
],
]);
}
59 changes: 59 additions & 0 deletions lib/core/theme.dart
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,22 @@ class CalcPalette extends ThemeExtension<CalcPalette> {
/// that counts invitations.
final Color clay;

/// The type ladder under the primary ink: a window or dialog's own title,
/// the heading over a group, the label of a row that is not selected, and
/// the line that describes what a row does.
final Color textHeading;
final Color textSubheading;
final Color textMuted;
final Color textDescription;

/// A card of rows inside a dialog, a step off the pane it sits on, and the
/// edge between a dialog's navigation and its pane.
final Color cardBackground;
final Color paneEdge;

/// A switch that is off: the track reads as a slot, not as a control.
final Color switchTrackOff;

/// How much of the desktop the window's chrome lets through: a multiplier on
/// the alpha of every [GlassSurface]. 1 is fully opaque.
///
Expand Down Expand Up @@ -207,6 +223,13 @@ class CalcPalette extends ThemeExtension<CalcPalette> {
required this.totalPillBackground,
required this.totalPillText,
required this.clay,
required this.textHeading,
required this.textSubheading,
required this.textMuted,
required this.textDescription,
required this.cardBackground,
required this.paneEdge,
required this.switchTrackOff,
this.translucency = 1,
this.paperTranslucency = 1,
});
Expand Down Expand Up @@ -262,6 +285,13 @@ class CalcPalette extends ThemeExtension<CalcPalette> {
Color? totalPillBackground,
Color? totalPillText,
Color? clay,
Color? textHeading,
Color? textSubheading,
Color? textMuted,
Color? textDescription,
Color? cardBackground,
Color? paneEdge,
Color? switchTrackOff,
double? translucency,
double? paperTranslucency,
}) => CalcPalette(
Expand Down Expand Up @@ -314,6 +344,13 @@ class CalcPalette extends ThemeExtension<CalcPalette> {
totalPillBackground: totalPillBackground ?? this.totalPillBackground,
totalPillText: totalPillText ?? this.totalPillText,
clay: clay ?? this.clay,
textHeading: textHeading ?? this.textHeading,
textSubheading: textSubheading ?? this.textSubheading,
textMuted: textMuted ?? this.textMuted,
textDescription: textDescription ?? this.textDescription,
cardBackground: cardBackground ?? this.cardBackground,
paneEdge: paneEdge ?? this.paneEdge,
switchTrackOff: switchTrackOff ?? this.switchTrackOff,
translucency: translucency ?? this.translucency,
paperTranslucency: paperTranslucency ?? this.paperTranslucency,
);
Expand Down Expand Up @@ -375,6 +412,13 @@ class CalcPalette extends ThemeExtension<CalcPalette> {
totalPillBackground: mix(totalPillBackground, other.totalPillBackground),
totalPillText: mix(totalPillText, other.totalPillText),
clay: mix(clay, other.clay),
textHeading: mix(textHeading, other.textHeading),
textSubheading: mix(textSubheading, other.textSubheading),
textMuted: mix(textMuted, other.textMuted),
textDescription: mix(textDescription, other.textDescription),
cardBackground: mix(cardBackground, other.cardBackground),
paneEdge: mix(paneEdge, other.paneEdge),
switchTrackOff: mix(switchTrackOff, other.switchTrackOff),
translucency: translucency + (other.translucency - translucency) * t,
paperTranslucency:
paperTranslucency + (other.paperTranslucency - paperTranslucency) * t,
Expand Down Expand Up @@ -949,6 +993,13 @@ class KapyTheme {
totalPillBackground: Color(0xFF7D9468),
totalPillText: Color(0xFF1C1A17),
clay: Color(0xFFCF7A57),
textHeading: Color(0xFFDAD4C7),
textSubheading: Color(0xFFD3CCBE),
textMuted: Color(0xFFB2AA9A),
textDescription: Color(0xFF9C9485),
cardBackground: Color(0xFF292621),
paneEdge: Color(0xFF2C2924),
switchTrackOff: Color(0xFF3A362F),
);

/// A cool, clean paper palette rather than the previous warm stationery.
Expand Down Expand Up @@ -1004,6 +1055,13 @@ class KapyTheme {
totalPillBackground: Color(0xFF56703C),
totalPillText: Color(0xFFFCFAF4),
clay: Color(0xFFD0663B),
textHeading: Color(0xFF292B30),
textSubheading: Color(0xFF3F4248),
textMuted: Color(0xFF55585E),
textDescription: Color(0xFF6B6D73),
cardBackground: Color(0xFFF2F1ED),
paneEdge: Color(0xFFE2E0DA),
switchTrackOff: Color(0xFFDAD8D2),
);

/// Transparency mode.
Expand Down Expand Up @@ -1208,6 +1266,7 @@ class KapyTheme {
),
dialogTheme: DialogThemeData(
backgroundColor: palette.surfaceBackground,
barrierColor: palette.scrim,
surfaceTintColor: Colors.transparent,
elevation: 0,
shadowColor: Colors.transparent,
Expand Down
8 changes: 4 additions & 4 deletions lib/ui/account/sharing_pane.dart
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class SharingPane extends StatelessWidget {
return Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
const SettingsLabel('SHARING'),
const SettingsLabel('Sharing'),
SettingsGroup(
children: [
SettingsRow(
Expand Down Expand Up @@ -226,7 +226,7 @@ class _SharingPaneBodyState extends State<SharingPaneBody> {
return Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
const SettingsLabel('SHARING'),
const SettingsLabel('Sharing'),
SettingsGroup(
key: const ValueKey('sharing-group'),
children: [
Expand Down Expand Up @@ -298,8 +298,8 @@ class _SharingPaneBodyState extends State<SharingPaneBody> {
: 'Share from the people button, or long-press a note.',
),
if (sharing.blocks.isNotEmpty) ...[
const SizedBox(height: 18),
const SettingsLabel('BLOCKED'),
SizedBox(height: SettingsMetrics.groupGap),
const SettingsLabel('Blocked'),
SettingsGroup(
children: [
for (final block in sharing.blocks)
Expand Down
6 changes: 3 additions & 3 deletions lib/ui/account/sync_pane.dart
Original file line number Diff line number Diff line change
Expand Up @@ -1156,8 +1156,8 @@ class _ReadyState extends State<_Ready> {
onTap: () => unawaited(showProSheet(context, billing: billing)),
),
],
const SizedBox(height: 18),
const SettingsLabel('ACCOUNT'),
SizedBox(height: SettingsMetrics.groupGap),
const SettingsLabel('Account'),
SettingsGroup(
children: [
SettingsRow(
Expand Down Expand Up @@ -1303,7 +1303,7 @@ class DeleteAccountSettings extends StatelessWidget {
return Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
const SettingsLabel('ACCOUNT DELETION'),
const SettingsLabel('Account deletion'),
SettingsGroup(
children: [
SettingsRow(
Expand Down
11 changes: 6 additions & 5 deletions lib/ui/control_surface.dart
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,15 @@ InputDecoration kapyFieldDecoration(
BoxConstraints? suffixIconConstraints,
EdgeInsetsGeometry? contentPadding,
Color? fillColor,
double? borderWidth,
double? radius,
}) {
final palette = context.palette;
final error = Theme.of(context).colorScheme.error;
OutlineInputBorder border(Color color, {double width = 1}) =>
OutlineInputBorder(
borderRadius: BorderRadius.circular(AppRadii.control),
borderSide: BorderSide(color: color, width: width),
);
OutlineInputBorder border(Color color, {double? width}) => OutlineInputBorder(
borderRadius: BorderRadius.circular(radius ?? AppRadii.control),
borderSide: BorderSide(color: color, width: width ?? borderWidth ?? 1),
);

return InputDecoration(
hintText: hintText,
Expand Down
Loading
Loading