finally fix visual bug

This commit is contained in:
zoe 2022-09-08 11:51:40 +02:00
parent 99e9294ece
commit 8bec897d52
3 changed files with 58 additions and 53 deletions

View File

@ -117,7 +117,9 @@ class _FullPostViewState extends State<FullPostView> {
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
SelectableText(
"${"post-found-on".i18n()} $idsChecked ${idsChecked == 1 ? "instance".i18n() : "instances".i18n()}"),
"${"post-found-on".i18n()} $idsChecked ${idsChecked == 1 ? "instance".i18n() : "instances".i18n()}",
textAlign: TextAlign.center,
),
const LinearProgressIndicator(),
],
)
@ -177,7 +179,7 @@ class _FullPostViewState extends State<FullPostView> {
),
Container(
constraints: BoxConstraints(
maxHeight: MediaQuery.of(context).size.height,
maxHeight: MediaQuery.of(context).size.height * 2 / 3,
maxWidth: global.getConstraints(context).maxWidth),
width: global.getWidth(context),
child: SingleChildScrollView(

View File

@ -172,59 +172,62 @@ class _ProfileViewState extends State<ProfileView> {
),
contentPadding: const EdgeInsets.all(0),
children: [
loading
? Column(
children: [
SelectableText(
"${"found-account-on".i18n()} ${identities.length} ${identities.length <= 1 ? "instance" : "instances".i18n()}"),
const LinearProgressIndicator(),
],
)
: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
DropdownButtonHideUnderline(
child: DropdownButton(
isExpanded: false,
alignment: Alignment.center,
iconEnabledColor: Theme.of(context).colorScheme.onSurface,
value: activeIdentity,
items: dmenuItems,
onChanged: (value) {
setState(() {
activeIdentity = value.toString();
});
reloadPosts();
},
Column(children: [
loading
? Column(
children: [
SelectableText(
"${"found-account-on".i18n()} ${identities.length} ${identities.length <= 1 ? "instance" : "instances".i18n()}"),
const LinearProgressIndicator(),
],
)
: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
DropdownButtonHideUnderline(
child: DropdownButton(
isExpanded: false,
alignment: Alignment.center,
iconEnabledColor:
Theme.of(context).colorScheme.onSurface,
value: activeIdentity,
items: dmenuItems,
onChanged: (value) {
setState(() {
activeIdentity = value.toString();
});
reloadPosts();
},
),
),
),
],
),
Container(
constraints: global.getConstraints(context),
width: global.getWidth(context) +
MediaQuery.of(context).size.width * 0.2,
height: MediaQuery.of(context).size.height * 2 / 3,
child: ListView.builder(
controller: _scrollController,
itemCount: threads.length + 2,
itemBuilder: (context, index) {
if (index == 0) {
return profileViewDisplay;
} else if (index > 0 && index <= threads.length) {
return Padding(
padding: const EdgeInsets.all(8.0),
child: Thread(
model: threads[index - 1],
constrained: false,
),
);
}
],
),
Container(
constraints: global.getConstraints(context),
width: global.getWidth(context) +
MediaQuery.of(context).size.width * 0.2,
height: MediaQuery.of(context).size.height * 2 / 3,
child: ListView.builder(
controller: _scrollController,
itemCount: threads.length + 2,
itemBuilder: (context, index) {
if (index == 0) {
return profileViewDisplay;
} else if (index > 0 && index <= threads.length) {
return Padding(
padding: const EdgeInsets.all(8.0),
child: Thread(
model: threads[index - 1],
constrained: false,
),
);
}
return const LoadingBox();
},
return const LoadingBox();
},
),
),
),
]),
],
);
}

View File

@ -162,7 +162,7 @@ ThemeData getTheme(CustomColors colors) {
primaryIconTheme: const IconThemeData(size: 24),
hoverColor: colors.colorScheme.background,
shadowColor: colors.colorScheme.surface,
focusColor: colors.hintColor,
focusColor: colors.colorScheme.background,
indicatorColor: colors.hintColor,
disabledColor: colors.hintColor,
unselectedWidgetColor: colors.hintColor,