docs: drop the dead font registry and resync the reader UI spec with the shipped chrome
This commit is contained in:
parent
ac9118a453
commit
df705d831f
5 changed files with 8 additions and 30 deletions
|
|
@ -136,7 +136,6 @@ class InternalPages {
|
|||
_Option(_strings.t('settings-variant-green'), 'green'),
|
||||
_Option(_strings.t('settings-variant-mono'), 'mono'),
|
||||
], current: _settings.variant.value),
|
||||
// The library pages stay reachable now the sheet is gone.
|
||||
HeadingBlock(2, [MewsText(_strings.t('settings-library-heading'))]),
|
||||
ListBlock(
|
||||
ordered: false,
|
||||
|
|
|
|||
|
|
@ -83,7 +83,7 @@ class MewsApp extends StatelessWidget {
|
|||
}
|
||||
}
|
||||
|
||||
/// The chrome (address bar, FOB, sheet, dialogs) follows the same palette
|
||||
/// The chrome (address bar, dialogs, text selection) follows the same palette
|
||||
/// the reader selected for pages, so the whole app shares one color scheme.
|
||||
class _ThemedApp extends StatelessWidget {
|
||||
const _ThemedApp();
|
||||
|
|
@ -135,11 +135,6 @@ class _ThemedApp extends StatelessWidget {
|
|||
useMaterial3: true,
|
||||
colorScheme: scheme,
|
||||
scaffoldBackgroundColor: palette.background,
|
||||
// The FOB follows the palette, not the M3 container defaults.
|
||||
floatingActionButtonTheme: FloatingActionButtonThemeData(
|
||||
backgroundColor: palette.link,
|
||||
foregroundColor: palette.background,
|
||||
),
|
||||
// Selection highlights and the caret follow the palette too.
|
||||
textSelectionTheme: TextSelectionThemeData(
|
||||
cursorColor: palette.link,
|
||||
|
|
|
|||
|
|
@ -1,15 +0,0 @@
|
|||
/// The bundled typefaces the reader can choose from (spec 8.2). Adding a font
|
||||
/// is one TTF in assets/fonts, one entry in pubspec.yaml and one entry here.
|
||||
class ReaderFont {
|
||||
const ReaderFont(this.family, this.labelId);
|
||||
|
||||
/// The pubspec font family name.
|
||||
final String family;
|
||||
|
||||
/// Message ID of its display name in locales/en-US/main.ftl.
|
||||
final String labelId;
|
||||
}
|
||||
|
||||
const readerFonts = [
|
||||
ReaderFont('Atkinson Hyperlegible', 'settings-font-atkinson'),
|
||||
];
|
||||
|
|
@ -13,8 +13,7 @@ import 'palettes.dart';
|
|||
import 'swipe_navigator.dart';
|
||||
|
||||
/// The whole v1 UI: an address bar that hides on scroll, the page reader with
|
||||
/// swipe back/forward, a settings FOB that appears on scroll, and error
|
||||
/// states that never guess.
|
||||
/// swipe back/forward, and error states that never guess.
|
||||
class ReaderScreen extends StatefulWidget {
|
||||
const ReaderScreen({super.key});
|
||||
|
||||
|
|
@ -49,8 +48,8 @@ class _ReaderScreenState extends State<ReaderScreen> {
|
|||
if (!_scroll.hasClients) return;
|
||||
final position = _scroll.position;
|
||||
|
||||
// The bar and FOB hide when the reader scrolls down and come back on any
|
||||
// upward scroll; both are always visible at the top of the page.
|
||||
// The bar hides when the reader scrolls down and comes back on any
|
||||
// upward scroll; it is always visible at the top of the page.
|
||||
final wantVisible = position.pixels <= 0 ||
|
||||
position.userScrollDirection == ScrollDirection.forward;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue