settings: Do not show navigation toolbar setting if window aspect ratio is less than 1.7
This commit is contained in:
parent
c629ec8f1b
commit
699bd264a2
|
@ -67,7 +67,9 @@ class Constants {
|
|||
static String githubThanksURL = "$githubRepoWiKiURL/thanks";
|
||||
static String giteeThanksURL = "$giteeRepoWiKiURL/thanks";
|
||||
|
||||
static final windowWidth = window.physicalSize.width;
|
||||
static final windowHeight = window.physicalSize.height;
|
||||
static final windowAspectRatio = windowHeight / windowWidth;
|
||||
}
|
||||
|
||||
bool isSmallScreen() {
|
||||
|
|
|
@ -92,7 +92,7 @@ Future<void> main() async {
|
|||
);
|
||||
|
||||
print(window.physicalSize);
|
||||
print(Constants.windowHeight);
|
||||
print(Constants.windowAspectRatio);
|
||||
|
||||
SystemChrome.setPreferredOrientations(
|
||||
[DeviceOrientation.portraitUp, DeviceOrientation.portraitDown],
|
||||
|
|
|
@ -388,13 +388,15 @@ class _PersonalizationSettingsPageState
|
|||
titleString: S.of(context).isNotationsShown,
|
||||
),
|
||||
ListItemDivider(),
|
||||
SettingsSwitchListTile(
|
||||
Constants.windowAspectRatio > 1.7
|
||||
? SettingsSwitchListTile(
|
||||
context: context,
|
||||
value: Config.isHistoryNavigationToolbarShown,
|
||||
onChanged: setIsHistoryNavigationToolbarShown,
|
||||
titleString: S.of(context).isHistoryNavigationToolbarShown,
|
||||
),
|
||||
ListItemDivider(),
|
||||
) : SizedBox(height: 1),
|
||||
Constants.windowAspectRatio > 1.7
|
||||
? ListItemDivider(): SizedBox(height: 1),
|
||||
SettingsListTile(
|
||||
context: context,
|
||||
titleString: S.of(context).boardBorderLineWidth,
|
||||
|
|
Loading…
Reference in New Issue