From f83342aa143939e8e675152c2b0577d21e72a597 Mon Sep 17 00:00:00 2001 From: loathingKernel <142770+loathingKernel@users.noreply.github.com> Date: Fri, 10 Mar 2023 18:23:26 +0200 Subject: [PATCH] UI: Fix over-layouting in SyncWidget --- .../tabs/games/game_info/sync_widget.py | 23 +- .../tabs/games/game_info/sync_widget.ui | 220 ++++++++++-------- 2 files changed, 129 insertions(+), 114 deletions(-) diff --git a/rare/ui/components/tabs/games/game_info/sync_widget.py b/rare/ui/components/tabs/games/game_info/sync_widget.py index 5f2f58ad..719788e5 100644 --- a/rare/ui/components/tabs/games/game_info/sync_widget.py +++ b/rare/ui/components/tabs/games/game_info/sync_widget.py @@ -14,18 +14,16 @@ from PyQt5 import QtCore, QtGui, QtWidgets class Ui_SyncWidget(object): def setupUi(self, SyncWidget): SyncWidget.setObjectName("SyncWidget") - SyncWidget.resize(208, 109) - self.main_layout = QtWidgets.QVBoxLayout(SyncWidget) - self.main_layout.setContentsMargins(0, 0, 0, 0) - self.main_layout.setObjectName("main_layout") - self.horizontalLayout = QtWidgets.QHBoxLayout() - self.horizontalLayout.setObjectName("horizontalLayout") + SyncWidget.resize(510, 183) + self.sync_layout = QtWidgets.QHBoxLayout(SyncWidget) + self.sync_layout.setContentsMargins(0, 0, 0, 0) + self.sync_layout.setObjectName("sync_layout") self.local_gb = QtWidgets.QGroupBox(SyncWidget) self.local_gb.setObjectName("local_gb") self.local_layout = QtWidgets.QVBoxLayout(self.local_gb) self.local_layout.setObjectName("local_layout") self.date_info_local = QtWidgets.QLabel(self.local_gb) - self.date_info_local.setText("TextLabel") + self.date_info_local.setText("local_date_error") self.date_info_local.setAlignment(QtCore.Qt.AlignCenter) self.date_info_local.setObjectName("date_info_local") self.local_layout.addWidget(self.date_info_local) @@ -40,18 +38,20 @@ class Ui_SyncWidget(object): self.icon_local.setObjectName("icon_local") self.local_layout.addWidget(self.icon_local) self.local_new_label = QtWidgets.QLabel(self.local_gb) + self.local_new_label.setAlignment(QtCore.Qt.AlignCenter) self.local_new_label.setObjectName("local_new_label") self.local_layout.addWidget(self.local_new_label) self.upload_button = QtWidgets.QPushButton(self.local_gb) + self.upload_button.setMinimumSize(QtCore.QSize(128, 0)) self.upload_button.setObjectName("upload_button") self.local_layout.addWidget(self.upload_button) - self.horizontalLayout.addWidget(self.local_gb) + self.sync_layout.addWidget(self.local_gb) self.cloud_gb = QtWidgets.QGroupBox(SyncWidget) self.cloud_gb.setObjectName("cloud_gb") self.cloud_layout = QtWidgets.QVBoxLayout(self.cloud_gb) self.cloud_layout.setObjectName("cloud_layout") self.date_info_remote = QtWidgets.QLabel(self.cloud_gb) - self.date_info_remote.setText("TextLabel") + self.date_info_remote.setText("remote_date_error") self.date_info_remote.setAlignment(QtCore.Qt.AlignCenter) self.date_info_remote.setObjectName("date_info_remote") self.cloud_layout.addWidget(self.date_info_remote) @@ -66,13 +66,14 @@ class Ui_SyncWidget(object): self.icon_remote.setObjectName("icon_remote") self.cloud_layout.addWidget(self.icon_remote) self.cloud_new_label = QtWidgets.QLabel(self.cloud_gb) + self.cloud_new_label.setAlignment(QtCore.Qt.AlignCenter) self.cloud_new_label.setObjectName("cloud_new_label") self.cloud_layout.addWidget(self.cloud_new_label) self.download_button = QtWidgets.QPushButton(self.cloud_gb) + self.download_button.setMinimumSize(QtCore.QSize(128, 0)) self.download_button.setObjectName("download_button") self.cloud_layout.addWidget(self.download_button) - self.horizontalLayout.addWidget(self.cloud_gb) - self.main_layout.addLayout(self.horizontalLayout) + self.sync_layout.addWidget(self.cloud_gb) self.retranslateUi(SyncWidget) diff --git a/rare/ui/components/tabs/games/game_info/sync_widget.ui b/rare/ui/components/tabs/games/game_info/sync_widget.ui index 8aa32ac6..d5869bcf 100644 --- a/rare/ui/components/tabs/games/game_info/sync_widget.ui +++ b/rare/ui/components/tabs/games/game_info/sync_widget.ui @@ -6,14 +6,14 @@ 0 0 - 208 - 109 + 510 + 183 Form - + 0 @@ -27,106 +27,120 @@ 0 - - - - - Local - - - - - - TextLabel - - - Qt::AlignCenter - - - - - - - - 0 - 0 - - - - - - - Qt::AlignCenter - - - - - - - Newer - - - - - - - Upload - - - - - - - - - - Cloud - - - - - - TextLabel - - - Qt::AlignCenter - - - - - - - - 0 - 0 - - - - - - - Qt::AlignCenter - - - - - - - Newer - - - - - - - Download - - - - - - - + + + Local + + + + + + local_date_error + + + Qt::AlignCenter + + + + + + + + 0 + 0 + + + + + + + Qt::AlignCenter + + + + + + + Newer + + + Qt::AlignCenter + + + + + + + + 128 + 0 + + + + Upload + + + + + + + + + + Cloud + + + + + + remote_date_error + + + Qt::AlignCenter + + + + + + + + 0 + 0 + + + + + + + Qt::AlignCenter + + + + + + + Newer + + + Qt::AlignCenter + + + + + + + + 128 + 0 + + + + Download + + + + +