Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix invisible selection color for title text fields #1563

Merged
merged 1 commit into from
Apr 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 27 additions & 19 deletions app/lib/blackboard/blackboard_dialog.dart
Original file line number Diff line number Diff line change
Expand Up @@ -339,27 +339,35 @@ class _TitleField extends StatelessWidget {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
PrefilledTextField(
prefilledText: initialTitle,
focusNode: focusNode,
cursorColor: Colors.white,
maxLines: null,
style: const TextStyle(
color: Colors.white,
fontSize: 20.0,
fontWeight: FontWeight.w400,
Theme(
data: Theme.of(context).copyWith(
textSelectionTheme: !context.isDarkThemeEnabled
? const TextSelectionThemeData(
selectionColor: Colors.white24)
: null,
),
decoration: const InputDecoration(
hintText: "Titel eingeben",
hintStyle: TextStyle(color: Colors.white),
border: InputBorder.none,
enabledBorder: InputBorder.none,
focusedBorder: InputBorder.none,
contentPadding: EdgeInsets.zero,
fillColor: Colors.transparent,
child: PrefilledTextField(
prefilledText: initialTitle,
focusNode: focusNode,
cursorColor: Colors.white,
maxLines: null,
style: const TextStyle(
color: Colors.white,
fontSize: 20.0,
fontWeight: FontWeight.w400,
),
decoration: const InputDecoration(
hintText: "Titel eingeben",
hintStyle: TextStyle(color: Colors.white),
border: InputBorder.none,
enabledBorder: InputBorder.none,
focusedBorder: InputBorder.none,
contentPadding: EdgeInsets.zero,
fillColor: Colors.transparent,
),
onChanged: (String title) => bloc.changeTitle(title),
textCapitalization: TextCapitalization.sentences,
),
onChanged: (String title) => bloc.changeTitle(title),
textCapitalization: TextCapitalization.sentences,
),
Text(
snapshot.error?.toString() ?? "",
Expand Down
48 changes: 28 additions & 20 deletions app/lib/homework/homework_dialog/homework_dialog.dart
Original file line number Diff line number Diff line change
Expand Up @@ -957,28 +957,36 @@ class _TitleFieldBase extends StatelessWidget {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
PrefilledTextField(
key: HwDialogKeys.titleTextField,
prefilledText: prefilledTitle,
focusNode: focusNode,
cursorColor: Colors.white,
maxLines: null,
style: const TextStyle(
color: Colors.white,
fontSize: 22,
fontWeight: FontWeight.w400,
Theme(
data: Theme.of(context).copyWith(
textSelectionTheme: !context.isDarkThemeEnabled
? const TextSelectionThemeData(
selectionColor: Colors.white24)
: null,
),
decoration: const InputDecoration(
hintText: "Titel eingeben (z.B. AB Nr. 1 - 3)",
hintStyle: TextStyle(color: Colors.white),
border: InputBorder.none,
enabledBorder: InputBorder.none,
focusedBorder: InputBorder.none,
contentPadding: EdgeInsets.zero,
fillColor: Colors.transparent,
child: PrefilledTextField(
key: HwDialogKeys.titleTextField,
prefilledText: prefilledTitle,
focusNode: focusNode,
cursorColor: Colors.white,
maxLines: null,
style: const TextStyle(
color: Colors.white,
fontSize: 22,
fontWeight: FontWeight.w400,
),
decoration: const InputDecoration(
hintText: "Titel eingeben (z.B. AB Nr. 1 - 3)",
hintStyle: TextStyle(color: Colors.white),
border: InputBorder.none,
enabledBorder: InputBorder.none,
focusedBorder: InputBorder.none,
contentPadding: EdgeInsets.zero,
fillColor: Colors.transparent,
),
onChanged: onChanged,
textCapitalization: TextCapitalization.sentences,
),
onChanged: onChanged,
textCapitalization: TextCapitalization.sentences,
),
Text(
errorText ?? "",
Expand Down
47 changes: 28 additions & 19 deletions app/lib/ical_links/dialog/ical_links_dialog.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
//
// SPDX-License-Identifier: EUPL-1.2

import 'package:build_context/build_context.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';
import 'package:sharezone/ical_links/dialog/ical_links_dialog_controller.dart';
Expand Down Expand Up @@ -158,27 +159,35 @@ class _TitleFieldBase extends StatelessWidget {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
PrefilledTextField(
prefilledText: prefilledTitle,
focusNode: focusNode,
cursorColor: Colors.white,
maxLines: null,
style: const TextStyle(
color: Colors.white,
fontSize: 22,
fontWeight: FontWeight.w400,
Theme(
data: Theme.of(context).copyWith(
textSelectionTheme: !context.isDarkThemeEnabled
? const TextSelectionThemeData(
selectionColor: Colors.white24)
: null,
),
decoration: const InputDecoration(
hintText: "Name eingeben (z.B. Meine Prüfungen)",
hintStyle: TextStyle(color: Colors.white),
border: InputBorder.none,
enabledBorder: InputBorder.none,
focusedBorder: InputBorder.none,
contentPadding: EdgeInsets.zero,
fillColor: Colors.transparent,
child: PrefilledTextField(
prefilledText: prefilledTitle,
focusNode: focusNode,
cursorColor: Colors.white,
maxLines: null,
style: const TextStyle(
color: Colors.white,
fontSize: 22,
fontWeight: FontWeight.w400,
),
decoration: const InputDecoration(
hintText: "Name eingeben (z.B. Meine Prüfungen)",
hintStyle: TextStyle(color: Colors.white),
border: InputBorder.none,
enabledBorder: InputBorder.none,
focusedBorder: InputBorder.none,
contentPadding: EdgeInsets.zero,
fillColor: Colors.transparent,
),
onChanged: onChanged,
textCapitalization: TextCapitalization.sentences,
),
onChanged: onChanged,
textCapitalization: TextCapitalization.sentences,
),
Text(
errorText ?? "",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -310,28 +310,36 @@ class _TitleFieldBase extends StatelessWidget {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
PrefilledTextField(
key: HwDialogKeys.titleTextField,
prefilledText: prefilledTitle,
focusNode: focusNode,
cursorColor: Colors.white,
maxLines: null,
style: const TextStyle(
color: Colors.white,
fontSize: 22,
fontWeight: FontWeight.w400,
Theme(
data: Theme.of(context).copyWith(
textSelectionTheme: !context.isDarkThemeEnabled
? const TextSelectionThemeData(
selectionColor: Colors.white24)
: null,
),
decoration: InputDecoration(
hintText: hintText,
hintStyle: const TextStyle(color: Colors.white),
border: InputBorder.none,
enabledBorder: InputBorder.none,
focusedBorder: InputBorder.none,
contentPadding: EdgeInsets.zero,
fillColor: Colors.transparent,
child: PrefilledTextField(
key: HwDialogKeys.titleTextField,
prefilledText: prefilledTitle,
focusNode: focusNode,
cursorColor: Colors.white,
maxLines: null,
style: const TextStyle(
color: Colors.white,
fontSize: 22,
fontWeight: FontWeight.w400,
),
decoration: InputDecoration(
hintText: hintText,
hintStyle: const TextStyle(color: Colors.white),
border: InputBorder.none,
enabledBorder: InputBorder.none,
focusedBorder: InputBorder.none,
contentPadding: EdgeInsets.zero,
fillColor: Colors.transparent,
),
onChanged: onChanged,
textCapitalization: TextCapitalization.sentences,
),
onChanged: onChanged,
textCapitalization: TextCapitalization.sentences,
),
Text(
errorText ?? "",
Expand Down
Loading