Skip to content

Commit 4469eeb

Browse files
committed
[*] improve ui
1 parent f6d0c32 commit 4469eeb

File tree

5 files changed

+11
-7
lines changed

5 files changed

+11
-7
lines changed

wayshot/ui/desktop-window.slint

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ import {
1919
import { DesktopPanel } from "panel/desktop/desktop.slint";
2020

2121
export component AppWindow inherits Window {
22-
width: Theme.default-width;
23-
height: Theme.default-height;
22+
preferred-width: Theme.default-width;
23+
preferred-height: Theme.default-height;
2424
default-font-size: Theme.default-font-size;
2525
default-font-weight: Theme.normal-font-weight;
2626
default-font-family: Theme.default-font-family;

wayshot/ui/panel/desktop/desktop.slint

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,6 @@ component HorizontalStatusBar inherits StatusBar {
100100
icon: Icons.brand;
101101
title: AboutSetting.app-name;
102102
is-show-tip: true;
103-
disable-maximal: true;
104103

105104
HorizontalLayout {
106105
padding-right: Theme.padding * 2;
@@ -231,6 +230,7 @@ export component DesktopPanel inherits Rectangle {
231230

232231
Home {
233232
vertical-stretch: 1;
233+
height: root.height - (Store.setting-preference.no-frame ? Theme.header-height : 0);
234234
}
235235
}
236236
}

wayshot/ui/panel/desktop/home.slint

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,13 @@ import { PlayerPanel } from "player.slint";
55
import { HistoryPanel } from "history.slint";
66

77
export component Home inherits VerticalLayout {
8-
if Store.current-tab-index == TabIndex.Home: MainPanel { }
8+
if Store.current-tab-index == TabIndex.Home: MainPanel {
9+
height: parent.height;
10+
}
911

1012
if Store.current-tab-index == TabIndex.History: HistoryPanel { }
1113

12-
if Store.current-tab-index == TabIndex.Player: PlayerPanel { }
14+
if Store.current-tab-index == TabIndex.Player: PlayerPanel {
15+
height: parent.height;
16+
}
1317
}

wayshot/ui/panel/desktop/main.slint

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -492,7 +492,7 @@ export component MainPanel inherits VerticalLayout {
492492
}
493493

494494
PreviewPanel {
495-
height: Theme.default-height - cp.preferred-height - cp.padding * 2 - parent.padding * 2 - parent.spacing - (Store.setting-preference.no-frame ? Theme.header-height : 0) - (root.is-show-banners ? root.banner-height : 0);
495+
height: parent.height - cp.preferred-height - cp.padding * 2 - parent.padding * 2 - parent.spacing - (root.is-show-banners ? root.banner-height : 0);
496496
}
497497

498498
cp := ControlPanel { }

wayshot/ui/panel/desktop/player.slint

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { Theme, Icons, Util, Logic, Store, PopupIndex } from "../def.slint";
22
import { VideoPlayer } from "../../base/widgets.slint";
33

44
export component PlayerPanel inherits VideoPlayer {
5-
height: Theme.default-height - (Store.setting-preference.no-frame ? Theme.header-height : 0);
5+
height: 100%;
66
show-speed-btn: false;
77
show-subtitle-btn: false;
88
show-full-screen-btn: false;

0 commit comments

Comments
 (0)