Skip to content
Snippets Groups Projects
Commit f121ea99 authored by Srikanth Ravipati's avatar Srikanth Ravipati Committed by Peterson, Peter
Browse files

Changed settings of memory widget and bar

for a reasonable balance on how they look on Windows and Mac
parent 7c0bfc96
No related branches found
No related tags found
No related merge requests found
......@@ -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):
......
......@@ -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 --------------------
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment