Tweak section headers (#90)
This commit is contained in:
parent
16475c107b
commit
b53e47b023
6 changed files with 15 additions and 9 deletions
|
|
@ -47,8 +47,6 @@ class _ChattersListState extends State<ChattersList> {
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
const textStyle = TextStyle(fontWeight: FontWeight.bold);
|
||||
|
||||
const headers = [
|
||||
'Broadcaster',
|
||||
'Staff',
|
||||
|
|
|
|||
|
|
@ -63,7 +63,6 @@ class _RecentEmotesPanelState extends State<RecentEmotesPanel> {
|
|||
'CLEAR',
|
||||
style: TextStyle(
|
||||
letterSpacing: 0.5,
|
||||
fontSize: 12.0,
|
||||
fontWeight: FontWeight.w500,
|
||||
),
|
||||
),
|
||||
|
|
|
|||
|
|
@ -104,7 +104,8 @@ abstract class ChatStoreBase with Store {
|
|||
_messages.add(IRCMessage.createNotice(message: 'Connecting to chat...'));
|
||||
|
||||
if (settings.chatDelay > 0) {
|
||||
_messages.add(IRCMessage.createNotice(message: 'Waiting ${settings.chatDelay.toInt()} seconds due to chat delay setting...'));
|
||||
_messages.add(IRCMessage.createNotice(
|
||||
message: 'Waiting ${settings.chatDelay.toInt()} ${settings.chatDelay == 1.0 ? 'second' : 'seconds'} due to message delay setting...'));
|
||||
}
|
||||
|
||||
connectToChat();
|
||||
|
|
|
|||
|
|
@ -66,6 +66,7 @@ class _SearchState extends State<Search> {
|
|||
if (_searchStore.searchHistory.isNotEmpty)
|
||||
const SectionHeader(
|
||||
'History',
|
||||
fontSize: 12.0,
|
||||
padding: headerPadding,
|
||||
),
|
||||
Expanded(
|
||||
|
|
@ -101,6 +102,7 @@ class _SearchState extends State<Search> {
|
|||
const SliverToBoxAdapter(
|
||||
child: SectionHeader(
|
||||
'Channels',
|
||||
fontSize: 12.0,
|
||||
padding: headerPadding,
|
||||
),
|
||||
),
|
||||
|
|
@ -111,6 +113,7 @@ class _SearchState extends State<Search> {
|
|||
const SliverToBoxAdapter(
|
||||
child: SectionHeader(
|
||||
'Categories',
|
||||
fontSize: 12.0,
|
||||
padding: headerPadding,
|
||||
),
|
||||
),
|
||||
|
|
|
|||
|
|
@ -21,13 +21,14 @@ class _ChatSettingsState extends State<ChatSettings> {
|
|||
Widget build(BuildContext context) {
|
||||
const timestamps = ['Disabled', '12-Hour', '24-Hour'];
|
||||
|
||||
const sectionPadding = EdgeInsets.only(left: 15.0, bottom: 5.0, top: 30.0);
|
||||
const sectionPadding = EdgeInsets.only(left: 16.0, bottom: 5.0, top: 30.0);
|
||||
|
||||
final settingsStore = widget.settingsStore;
|
||||
|
||||
return Observer(
|
||||
builder: (context) => ExpansionTile(
|
||||
expandedCrossAxisAlignment: CrossAxisAlignment.start,
|
||||
childrenPadding: const EdgeInsets.symmetric(vertical: 10.0),
|
||||
leading: const Icon(Icons.chat),
|
||||
title: const Text(
|
||||
'Chat',
|
||||
|
|
@ -42,7 +43,7 @@ class _ChatSettingsState extends State<ChatSettings> {
|
|||
children: [
|
||||
const Text('Message Delay'),
|
||||
const Spacer(),
|
||||
Text('${settingsStore.chatDelay.toInt()} seconds'),
|
||||
Text('${settingsStore.chatDelay.toInt()} ${settingsStore.chatDelay == 1.0 ? 'second' : 'seconds'}'),
|
||||
],
|
||||
),
|
||||
subtitle: Slider.adaptive(
|
||||
|
|
@ -55,6 +56,7 @@ class _ChatSettingsState extends State<ChatSettings> {
|
|||
),
|
||||
const SectionHeader(
|
||||
'Layout',
|
||||
fontSize: 12.0,
|
||||
padding: sectionPadding,
|
||||
),
|
||||
SwitchListTile.adaptive(
|
||||
|
|
@ -86,6 +88,7 @@ class _ChatSettingsState extends State<ChatSettings> {
|
|||
),
|
||||
const SectionHeader(
|
||||
'Emotes',
|
||||
fontSize: 12.0,
|
||||
padding: sectionPadding,
|
||||
),
|
||||
SwitchListTile.adaptive(
|
||||
|
|
@ -104,6 +107,7 @@ class _ChatSettingsState extends State<ChatSettings> {
|
|||
),
|
||||
const SectionHeader(
|
||||
'Message Appearance',
|
||||
fontSize: 12.0,
|
||||
padding: sectionPadding,
|
||||
),
|
||||
SwitchListTile.adaptive(
|
||||
|
|
@ -144,6 +148,7 @@ class _ChatSettingsState extends State<ChatSettings> {
|
|||
),
|
||||
const SectionHeader(
|
||||
'Message Sizing',
|
||||
fontSize: 12.0,
|
||||
padding: sectionPadding,
|
||||
),
|
||||
ExpansionTile(
|
||||
|
|
|
|||
|
|
@ -3,13 +3,13 @@ import 'package:flutter/material.dart';
|
|||
class SectionHeader extends StatelessWidget {
|
||||
final String text;
|
||||
final EdgeInsets padding;
|
||||
final double fontSize;
|
||||
final double? fontSize;
|
||||
|
||||
const SectionHeader(
|
||||
this.text, {
|
||||
Key? key,
|
||||
this.padding = const EdgeInsets.fromLTRB(10.0, 20.0, 10.0, 5.0),
|
||||
this.fontSize = 12.0,
|
||||
this.fontSize,
|
||||
}) : super(key: key);
|
||||
|
||||
@override
|
||||
|
|
@ -21,7 +21,7 @@ class SectionHeader extends StatelessWidget {
|
|||
style: TextStyle(
|
||||
color: DefaultTextStyle.of(context).style.color?.withOpacity(0.8),
|
||||
fontSize: fontSize,
|
||||
fontWeight: FontWeight.w500,
|
||||
fontWeight: FontWeight.w600,
|
||||
letterSpacing: 0.5,
|
||||
),
|
||||
),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue