From e7fe50361a11f3e0829ab99c4befcadb2b9972c0 Mon Sep 17 00:00:00 2001 From: Vinicius Moreira Date: Fri, 27 Nov 2020 19:03:30 -0300 Subject: [PATCH] [ui] fix: not able to maximize/minimize the history dialog on some systems --- CHANGELOG.md | 1 + bauh/view/qt/colors.py | 3 --- bauh/view/qt/history.py | 7 +++---- 3 files changed, 4 insertions(+), 7 deletions(-) delete mode 100644 bauh/view/qt/colors.py diff --git a/CHANGELOG.md b/CHANGELOG.md index 6a02776d..13f34bc0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -49,6 +49,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - not able to replace an installed package for a new one that replaces it during conflict resolutions (e.g: xapp replaces xapps) - AUR: not able to find some repository dependencies when their names are not an exact match (e.g: sc-controller [0.4.7-1] relies on "pylibacl". This dependency now is called "python-pylibacl") - UI + - history dialog: not able to maximize/minimize it on some systems - wrong tooltips ### i18n diff --git a/bauh/view/qt/colors.py b/bauh/view/qt/colors.py deleted file mode 100644 index ecd1ba57..00000000 --- a/bauh/view/qt/colors.py +++ /dev/null @@ -1,3 +0,0 @@ -GREEN = '#91a069' -ORANGE = '#ECB03E' -RED = '#FF614E' diff --git a/bauh/view/qt/history.py b/bauh/view/qt/history.py index 3edb8625..685d6346 100644 --- a/bauh/view/qt/history.py +++ b/bauh/view/qt/history.py @@ -2,12 +2,11 @@ import operator from functools import reduce from PyQt5.QtCore import Qt -from PyQt5.QtGui import QColor, QIcon, QCursor -from PyQt5.QtWidgets import QDialog, QVBoxLayout, QTableWidget, QTableWidgetItem, QHeaderView, QLabel +from PyQt5.QtGui import QIcon, QCursor +from PyQt5.QtWidgets import QDialog, QVBoxLayout, QTableWidget, QHeaderView, QLabel from bauh.api.abstract.cache import MemoryCache from bauh.api.abstract.model import PackageHistory -from bauh.view.qt.colors import GREEN, ORANGE from bauh.view.qt.view_model import PackageView from bauh.view.util.translation import I18n @@ -16,7 +15,7 @@ class HistoryDialog(QDialog): def __init__(self, history: PackageHistory, icon_cache: MemoryCache, i18n: I18n): super(HistoryDialog, self).__init__() - self.setWindowFlags(self.windowFlags() | Qt.WindowSystemMenuHint | Qt.WindowMinMaxButtonsHint) + self.setWindowFlags(Qt.CustomizeWindowHint | Qt.WindowMinMaxButtonsHint | Qt.WindowCloseButtonHint) view = PackageView(model=history.pkg, i18n=i18n)