Skip to content

Commit

Permalink
feat(instwin): update layout
Browse files Browse the repository at this point in the history
  • Loading branch information
ilharp committed Aug 9, 2023
1 parent ee0b911 commit 31a4bf4
Show file tree
Hide file tree
Showing 6 changed files with 104 additions and 17 deletions.
3 changes: 3 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,6 @@ indent_size = 4

[*.rs]
indent_size = 4

[*.ui]
indent_size = 1
2 changes: 2 additions & 0 deletions packages/instwin/.gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
src/instwin.rc
src/instwin.exe.manifest
src/koishi.png
src/koishi.ico
1 change: 1 addition & 0 deletions packages/instwin/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ set(PROJECT_SOURCES
src/windows/mainwindow.ui
${TS_FILES}
src/instwin.exe.manifest
src/instwin.qrc
src/instwin.rc
)

Expand Down
6 changes: 6 additions & 0 deletions packages/instwin/src/instwin.qrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<RCC>
<qresource prefix="/instwin">
<file>koishi.png</file>
<file>koishi.ico</file>
</qresource>
</RCC>
2 changes: 1 addition & 1 deletion packages/instwin/src/windows/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ void MainWindow::InitializeWindowStyle() {
HWND hWnd = reinterpret_cast<HWND>(winId());

// Fix window
setWindowFlag(Qt::MSWindowsFixedSizeDialogHint);
// setWindowFlag(Qt::MSWindowsFixedSizeDialogHint);

// Make widget transparent
setAttribute(Qt::WA_TranslucentBackground);
Expand Down
107 changes: 91 additions & 16 deletions packages/instwin/src/windows/mainwindow.ui
Original file line number Diff line number Diff line change
@@ -1,20 +1,95 @@
<?xml version="1.0" encoding="UTF-8" ?>
<ui version="4.0">
<class>MainWindow</class>
<widget class="QMainWindow" name="MainWindow">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>1366</width>
<height>768</height>
</rect>
</property>
<property name="windowTitle">
<string>Install Koishi</string>
</property>
<widget class="QWidget" name="centralwidget" />
<class>MainWindow</class>
<widget class="QMainWindow" name="MainWindow">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>1366</width>
<height>768</height>
</rect>
</property>
<property name="windowTitle">
<string>Install Koishi</string>
</property>
<widget class="QWidget" name="CentralWidget">
<layout class="QVBoxLayout" name="CentralWidgetV" stretch="1,7,2">
<item>
<widget class="QWidget" name="HeaderContainer" native="true" />
</item>
<item>
<layout class="QHBoxLayout" name="IconContainerH">
<item>
<widget class="QLabel" name="Icon">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="maximumSize">
<size>
<width>180</width>
<height>180</height>
</size>
</property>
<property name="pixmap">
<pixmap resource="../instwin.qrc">:/instwin/koishi.png</pixmap>
</property>
<property name="scaledContents">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QVBoxLayout" name="ControlsContainerV" stretch="2,1,1">
<item>
<widget class="QWidget" name="ControlsPlaceholder" />
</item>
<item>
<layout class="QHBoxLayout" name="DescriptionContainerH">
<item>
<widget class="QLabel" name="Description">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Tap "Install" to start the installation process.</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="ActionsContainerH">
<item>
<widget class="QPushButton" name="StartButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Install</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</item>
</layout>
</widget>
<resources />
<connections />
</widget>
<resources>
<include location="../instwin.qrc" />
</resources>
<connections />
</ui>

0 comments on commit 31a4bf4

Please sign in to comment.