diff options
author | Siddarth Suresh <155843085+SiddarthSuresh98@users.noreply.github.com> | 2025-04-27 09:12:50 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-04-27 09:12:50 -0400 |
commit | 5653b2a033e7a4173d2f178b5ce52384666d3d7b (patch) | |
tree | 5c8fc7282ad1ce0c215786a70b35296645df2a1b /gui/digitlabel.cc | |
parent | 3d0133c2f793e82d7519d8e2c5023114cd0f0eab (diff) | |
parent | a4dd1f00a5d0108058fb3bfbd5f399a507792859 (diff) |
Merge pull request #68 from bdunahu/bdunahu
[WIP] Pipeline cleanup and revisited GUI storage display
Diffstat (limited to 'gui/digitlabel.cc')
-rw-r--r-- | gui/digitlabel.cc | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/gui/digitlabel.cc b/gui/digitlabel.cc index 8314943..f77c1fa 100644 --- a/gui/digitlabel.cc +++ b/gui/digitlabel.cc @@ -16,6 +16,7 @@ // along with this program. If not, see <https://www.gnu.org/licenses/>. #include "digitlabel.h" +#include "util.h" #include "gui.h" DigitLabel::DigitLabel(QWidget *parent) : QLabel(parent) { setText(QString()); } @@ -42,11 +43,6 @@ void DigitLabel::on_hex_toggle(bool is_hex) void DigitLabel::update_display() { QString t; - if (this->is_cleared) { - setText(QString()); - } else { - t = (this->is_hex) ? QString::number(this->v, 16).toUpper() - : QString::number(this->v); - setText(t); - } + t = format_toggled_value(this->v, this->is_hex, this->is_cleared); + setText(t); } |