diff --git a/qt/applications/workbench/workbench/plugins/memorywidget/memoryview.py b/qt/applications/workbench/workbench/plugins/memorywidget/memoryview.py index 17b6823786b113a9a57e910b7d000fd0833f13d1..f2010e075e423cf36ce9a6bd7baff73892198acd 100644 --- a/qt/applications/workbench/workbench/plugins/memorywidget/memoryview.py +++ b/qt/applications/workbench/workbench/plugins/memorywidget/memoryview.py @@ -8,6 +8,7 @@ # # from qtpy.QtWidgets import QWidget, QProgressBar +from qtpy.QtCore import Qt NORMAL_STYLE = """ QProgressBar::chunk { @@ -36,6 +37,7 @@ class MemoryView(QWidget): self.critical = 90 self.memory_bar = QProgressBar(self) + self.memory_bar.setAlignment(Qt.AlignCenter) def set_bar_color(self, current_value, new_value): if from_normal_to_critical(self.critical, current_value, new_value): diff --git a/qt/applications/workbench/workbench/plugins/memorywidget/memorywidget.py b/qt/applications/workbench/workbench/plugins/memorywidget/memorywidget.py index b25403176c1da40eef4c20d88530724a84689a95..d91b8f5f162c4043634d6a247ccb9dc11176f0a0 100644 --- a/qt/applications/workbench/workbench/plugins/memorywidget/memorywidget.py +++ b/qt/applications/workbench/workbench/plugins/memorywidget/memorywidget.py @@ -22,13 +22,15 @@ class MemoryWidget(PluginWidget): self.presenter = MemoryPresenter(self.view) layout = QVBoxLayout() + self.view.memory_bar.setMinimumHeight(30) layout.addWidget(self.view.memory_bar) self.setLayout(layout) self.setWindowTitle(self.get_plugin_title()) - # 70 is chosen as a good value after testing - # how it looks for different values - self.setMaximumHeight(70) + # The following are chosen as a good value after + # testing how it looks for different values + self.setMinimumHeight(50) + self.setMaximumHeight(55) # ----------------- Plugin API --------------------