From 47a8fcd67d615804405288d401ab9d359782c3ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergio=20Mart=C3=ADnez=20Portela?= Date: Wed, 3 Nov 2021 00:54:50 +0100 Subject: [PATCH 1/2] Experiment with changing styles. --- main.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/main.py b/main.py index 36539f3..10b3a92 100755 --- a/main.py +++ b/main.py @@ -7,6 +7,9 @@ import time import webbrowser from PySide2.QtCore import QObject, QThread, Signal, Slot + +from PySide2.QtGui import QPalette, QColor + from PySide2.QtWidgets import ( QApplication, QDialog, @@ -48,6 +51,11 @@ class Dialog(QDialog): def __init__(self): super(Dialog, self).__init__() + palette = self.palette() + palette.setColor(QPalette.Window, QColor(255, 255, 255)) + self.setPalette(palette) + self.setAutoFillBackground(True) + self.setWindowTitle("OrgEditor") scrSize = self.screen().size() self.resize(scrSize.width() / 1.5, scrSize.height() / 1.5) @@ -156,7 +164,7 @@ class Dialog(QDialog): def build_agenda_task_widget(self, item): box = QHBoxLayout() - frame = QGroupBox() + frame = QFrame() frame.setLayout(box) state_button = QPushButton(text=f"{item.state or '-'}", maximumWidth=60) From cbd99f25acd070b6c397f9c7d8a98eadb86341e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergio=20Mart=C3=ADnez=20Portela?= Date: Wed, 3 Nov 2021 00:55:06 +0100 Subject: [PATCH 2/2] Add future history tab. --- main.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/main.py b/main.py index 10b3a92..d5360fc 100755 --- a/main.py +++ b/main.py @@ -88,6 +88,8 @@ class Dialog(QDialog): self.tabBar.addTab("Agenda") self.tabBar.addTab("Notes") self.tabBar.addTab("Tasks") + self.tabBar.addTab("History") + self.tabBar.currentChanged.connect(self.update_tab) layout.addWidget(self.tabBar) @@ -111,6 +113,8 @@ class Dialog(QDialog): self.loadNotes() elif tabIndex == 2: self.loadTasks() + elif tabIndex == 3: + self.loadHistory() def startLoad(self): self.edit.setDisabled(True) @@ -223,6 +227,9 @@ class Dialog(QDialog): def loadTasks(self): logging.warning("loadTasks not yet implemented") + def loadHistory(self): + logging.warning("loadHistory not yet implemented") + # Create the Qt Application if __name__ == "__main__":