mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
[flutter]: config initial scrren size
This commit is contained in:
@ -29,7 +29,9 @@ class ApplicationWidget extends StatelessWidget {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
setWindowMinSize(const Size(500, 500));
|
const ratio = 1.73;
|
||||||
|
setWindowMinSize(const Size(500, 500 / ratio));
|
||||||
|
setWindowFrame(const Rect.fromLTRB(0, 0, 1310, 1310 / ratio));
|
||||||
|
|
||||||
final theme = AppTheme.fromType(ThemeType.light);
|
final theme = AppTheme.fromType(ThemeType.light);
|
||||||
return Provider.value(
|
return Provider.value(
|
||||||
|
@ -17,8 +17,7 @@ class HomeLayout {
|
|||||||
late double homePageROffset;
|
late double homePageROffset;
|
||||||
late Duration animDuration;
|
late Duration animDuration;
|
||||||
|
|
||||||
HomeLayout(BuildContext context, BoxConstraints homeScreenConstraint,
|
HomeLayout(BuildContext context, BoxConstraints homeScreenConstraint, bool forceCollapse) {
|
||||||
bool forceCollapse) {
|
|
||||||
final homeBlocState = context.read<HomeBloc>().state;
|
final homeBlocState = context.read<HomeBloc>().state;
|
||||||
|
|
||||||
showEditPannel = homeBlocState.editContext.isSome();
|
showEditPannel = homeBlocState.editContext.isSome();
|
||||||
|
@ -86,6 +86,26 @@ class FlowyNavigation extends StatelessWidget {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
class IconNaviItemWidget extends StatelessWidget {
|
||||||
|
final NavigationItem item;
|
||||||
|
const IconNaviItemWidget(this.item, {Key? key}) : super(key: key);
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return SizedBox(
|
||||||
|
height: 24,
|
||||||
|
child: FlowyTextButton(
|
||||||
|
item.title,
|
||||||
|
padding: const EdgeInsets.symmetric(horizontal: 8, vertical: 2),
|
||||||
|
fontSize: 12,
|
||||||
|
onPressed: () {
|
||||||
|
debugPrint('show app document');
|
||||||
|
},
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
class NaviItemWidget extends StatelessWidget {
|
class NaviItemWidget extends StatelessWidget {
|
||||||
final NavigationItem item;
|
final NavigationItem item;
|
||||||
const NaviItemWidget(this.item, {Key? key}) : super(key: key);
|
const NaviItemWidget(this.item, {Key? key}) : super(key: key);
|
||||||
|
@ -52,9 +52,7 @@ class Sizes {
|
|||||||
|
|
||||||
static double get iconMed => 20;
|
static double get iconMed => 20;
|
||||||
|
|
||||||
static double get sideBarSm => 200 * hitScale;
|
static double get sideBarMed => 225 * hitScale;
|
||||||
|
|
||||||
static double get sideBarMed => 240 * hitScale;
|
|
||||||
|
|
||||||
static double get sideBarLg => 290 * hitScale;
|
static double get sideBarLg => 290 * hitScale;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user