From ee490280c8499db8152307b2ae025d022dc462a5 Mon Sep 17 00:00:00 2001 From: reionwong Date: Tue, 17 Aug 2021 10:01:16 +0800 Subject: [PATCH] Set window icon --- src/main.cpp | 5 ++++- src/qml/main.qml | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 64ad079..da7a2dc 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -23,15 +23,18 @@ #include #include #include +#include #include "processhelper.h" #include "utils.h" int main(int argc, char *argv[]) { - QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling); + QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps, true); + QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling, true); QApplication app(argc, argv); app.setOrganizationName("cutefishos"); + app.setWindowIcon(QIcon::fromTheme("terminal")); QQmlApplicationEngine engine; diff --git a/src/qml/main.qml b/src/qml/main.qml index e4e7d99..7451221 100644 --- a/src/qml/main.qml +++ b/src/qml/main.qml @@ -72,7 +72,7 @@ FishUI.Window { anchors.leftMargin: FishUI.Units.smallSpacing anchors.rightMargin: FishUI.Units.smallSpacing anchors.topMargin: FishUI.Units.smallSpacing -// anchors.bottomMargin: FishUI.Units.smallSpacing + anchors.bottomMargin: FishUI.Units.smallSpacing spacing: FishUI.Units.smallSpacing ListView { @@ -98,7 +98,7 @@ FishUI.Window { delegate: Item { id: _tabItem - height: root.header.height - FishUI.Units.largeSpacing + FishUI.Units.smallSpacing / 2 + height: root.header.height - FishUI.Units.largeSpacing width: Math.min(_layout.implicitWidth + FishUI.Units.largeSpacing, _tabView.width / _tabView.count - FishUI.Units.smallSpacing)