mirror of
https://github.com/wgh136/pixes.git
synced 2025-09-27 04:57:23 +00:00
update ui
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import 'package:fluent_ui/fluent_ui.dart';
|
||||
import 'package:flutter_staggered_grid_view/flutter_staggered_grid_view.dart';
|
||||
import 'package:pixes/components/segmented_button.dart';
|
||||
import 'package:pixes/foundation/app.dart';
|
||||
import 'package:pixes/components/title_bar.dart';
|
||||
import 'package:pixes/network/network.dart';
|
||||
import 'package:pixes/utils/translation.dart';
|
||||
|
||||
@@ -31,26 +31,23 @@ class _BookMarkedArtworkPageState extends State<BookMarkedArtworkPage>{
|
||||
}
|
||||
|
||||
Widget buildTab() {
|
||||
return Row(
|
||||
children: [
|
||||
Text("Following".tl, style: const TextStyle(fontWeight: FontWeight.bold, fontSize: 20)),
|
||||
const Spacer(),
|
||||
SegmentedButton(
|
||||
options: [
|
||||
SegmentedButtonOption("public", "Public".tl),
|
||||
SegmentedButtonOption("private", "Private".tl),
|
||||
],
|
||||
onPressed: (key) {
|
||||
if(key != restrict) {
|
||||
setState(() {
|
||||
restrict = key;
|
||||
});
|
||||
}
|
||||
},
|
||||
value: restrict,
|
||||
)
|
||||
],
|
||||
).paddingHorizontal(16).paddingVertical(4);
|
||||
return TitleBar(
|
||||
title: "Bookmarks".tl,
|
||||
action: SegmentedButton(
|
||||
options: [
|
||||
SegmentedButtonOption("public", "Public".tl),
|
||||
SegmentedButtonOption("private", "Private".tl),
|
||||
],
|
||||
onPressed: (key) {
|
||||
if(key != restrict) {
|
||||
setState(() {
|
||||
restrict = key;
|
||||
});
|
||||
}
|
||||
},
|
||||
value: restrict,
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
import 'package:fluent_ui/fluent_ui.dart';
|
||||
import 'package:flutter_staggered_grid_view/flutter_staggered_grid_view.dart';
|
||||
import 'package:pixes/foundation/app.dart';
|
||||
import 'package:pixes/components/title_bar.dart';
|
||||
import 'package:pixes/utils/translation.dart';
|
||||
|
||||
import '../components/illust_widget.dart';
|
||||
@@ -31,28 +31,24 @@ class _FollowingArtworksPageState extends State<FollowingArtworksPage> {
|
||||
}
|
||||
|
||||
Widget buildTab() {
|
||||
return Row(
|
||||
children: [
|
||||
Text("Following".tl,
|
||||
style: const TextStyle(fontSize: 20, fontWeight: FontWeight.bold),),
|
||||
const Spacer(),
|
||||
SegmentedButton(
|
||||
options: [
|
||||
SegmentedButtonOption("all", "All".tl),
|
||||
SegmentedButtonOption("public", "Public".tl),
|
||||
SegmentedButtonOption("private", "Private".tl),
|
||||
],
|
||||
onPressed: (key) {
|
||||
if(key != restrict) {
|
||||
setState(() {
|
||||
restrict = key;
|
||||
});
|
||||
}
|
||||
},
|
||||
value: restrict,
|
||||
)
|
||||
],
|
||||
).paddingHorizontal(16).paddingBottom(4);
|
||||
return TitleBar(
|
||||
title: "Following".tl,
|
||||
action: SegmentedButton(
|
||||
options: [
|
||||
SegmentedButtonOption("all", "All".tl),
|
||||
SegmentedButtonOption("public", "Public".tl),
|
||||
SegmentedButtonOption("private", "Private".tl),
|
||||
],
|
||||
onPressed: (key) {
|
||||
if(key != restrict) {
|
||||
setState(() {
|
||||
restrict = key;
|
||||
});
|
||||
}
|
||||
},
|
||||
value: restrict,
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -2,6 +2,7 @@ import 'package:flutter/widgets.dart';
|
||||
import 'package:flutter_staggered_grid_view/flutter_staggered_grid_view.dart';
|
||||
import 'package:pixes/components/illust_widget.dart';
|
||||
import 'package:pixes/components/loading.dart';
|
||||
import 'package:pixes/components/title_bar.dart';
|
||||
import 'package:pixes/foundation/app.dart';
|
||||
import 'package:pixes/network/network.dart';
|
||||
import 'package:pixes/utils/translation.dart';
|
||||
@@ -35,28 +36,22 @@ class _RecommendationPageState extends State<RecommendationPage> {
|
||||
}
|
||||
|
||||
Widget buildTab() {
|
||||
return SizedBox(
|
||||
child: Row(
|
||||
children: [
|
||||
Text("Explore".tl,
|
||||
style: const TextStyle(fontSize: 20, fontWeight: FontWeight.bold),),
|
||||
const Spacer(),
|
||||
SegmentedButton<int>(
|
||||
options: [
|
||||
SegmentedButtonOption(0, "Artworks".tl),
|
||||
SegmentedButtonOption(1, "Users".tl),
|
||||
],
|
||||
onPressed: (key) {
|
||||
if(key != type) {
|
||||
setState(() {
|
||||
type = key;
|
||||
});
|
||||
}
|
||||
},
|
||||
value: type,
|
||||
)
|
||||
return TitleBar(
|
||||
title: "Explore".tl,
|
||||
action: SegmentedButton<int>(
|
||||
options: [
|
||||
SegmentedButtonOption(0, "Artworks".tl),
|
||||
SegmentedButtonOption(1, "Users".tl),
|
||||
],
|
||||
).paddingHorizontal(16).paddingBottom(4),
|
||||
onPressed: (key) {
|
||||
if(key != type) {
|
||||
setState(() {
|
||||
type = key;
|
||||
});
|
||||
}
|
||||
},
|
||||
value: type,
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@@ -58,7 +58,7 @@ class _SearchPageState extends State<SearchPage> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return ScaffoldPage(
|
||||
padding: EdgeInsets.zero,
|
||||
padding: const EdgeInsets.only(top: 8),
|
||||
content: Column(
|
||||
children: [
|
||||
buildSearchBar(),
|
||||
|
Reference in New Issue
Block a user