Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
### 🌀 Changed
- Faster scrolling/zooming for long recordings at high zoom-out levels (uses a per-pixel min–max envelope with automatic downsampling depending on the zoom level)

### 🔧 Fixed
- Fix label colors in dark mode (they are now light)

## [0.6.5] · 2026-03-24
### 🌀 Changed
- Switch from Qt 5 to Qt 6
Expand Down
12 changes: 11 additions & 1 deletion src/gui/signal_browser/label_widget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ LabelWidget::LabelWidget (QSharedPointer<SignalViewSettings const> signal_view_s
: signal_view_settings_ (signal_view_settings),
y_start_ (0),
enable_separator_ (true),
label_color_ (Qt::black)
label_color_ (palette().color(QPalette::WindowText))
{
// nothing to do here
}
Expand All @@ -40,6 +40,16 @@ void LabelWidget::changeLabelColor(QColor labelColor)
update();
}

void LabelWidget::changeEvent(QEvent* event)
{
if (event->type() == QEvent::PaletteChange)
{
label_color_ = palette().color(QPalette::WindowText);
update();
}
QWidget::changeEvent(event);
}


//-----------------------------------------------------------------------------
void LabelWidget::paintEvent(QPaintEvent*)
Expand Down
1 change: 1 addition & 0 deletions src/gui/signal_browser/label_widget.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ public slots:
protected:
void paintEvent(QPaintEvent* pe);
virtual void contextMenuEvent (QContextMenuEvent* event);
virtual void changeEvent(QEvent* event);

private:
QSharedPointer<SignalViewSettings const> signal_view_settings_;
Expand Down
10 changes: 10 additions & 0 deletions src/gui/signal_browser/signal_browser_view.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
#include <QDebug>
#include <QResizeEvent>
#include <QGraphicsLinearLayout>
#include <QApplication>
#include <QPalette>

#include <math.h> /* round */

Expand Down Expand Up @@ -342,6 +344,14 @@ void SignalBrowserView::dropEvent (QDropEvent* event)
event->ignore();
}

//-----------------------------------------------------------------------------
void SignalBrowserView::changeEvent(QEvent* event)
{
if (event->type() == QEvent::PaletteChange)
emit model_->getSignalViewSettings()->labelColorChanged(palette().color(QPalette::WindowText));
QFrame::changeEvent(event);
}

//-----------------------------------------------------------------------------
void SignalBrowserView::dragEnterEvent(QDragEnterEvent *event)
{
Expand Down
1 change: 1 addition & 0 deletions src/gui/signal_browser/signal_browser_view.h
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ private slots:
void verticalScrollBarRangeChaned (int min, int max);
virtual void dropEvent (QDropEvent* event);
virtual void dragEnterEvent(QDragEnterEvent *event);
virtual void changeEvent(QEvent* event);
void graphicsViewResized (QResizeEvent* event);
void toggleXWidget(bool enabled);

Expand Down
4 changes: 3 additions & 1 deletion src/gui/signal_browser/signal_graphics_item.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
#include <QGraphicsSceneMouseEvent>
#include <QToolTip>
#include <QSettings>
#include <QApplication>
#include <QPalette>
#include <cmath>
#include <limits>

Expand Down Expand Up @@ -48,7 +50,7 @@ SignalGraphicsItem::SignalGraphicsItem (QSharedPointer<SignalViewSettings const>
created_event_item_ (0),
hand_tool_on_ (false),
grid_color_ (QColor(220, 220, 220, 50)), //set the default grid color
label_color_ (Qt::black)
label_color_ (QApplication::palette().color(QPalette::WindowText))
{
setFlag(QGraphicsItem::ItemUsesExtendedStyleOption, true);
setAcceptHoverEvents(false);
Expand Down
12 changes: 11 additions & 1 deletion src/gui/signal_browser/x_axis_widget_4.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ XAxisWidget::XAxisWidget (QSharedPointer<SignalViewSettings const> signal_view_s
length_in_sec_ (0),
highlighting_enabled_ (false),
time_to_highlight_ (0),
label_color_ (Qt::black)
label_color_ (palette().color(QPalette::WindowText))
{

}
Expand Down Expand Up @@ -82,6 +82,16 @@ void XAxisWidget::changeLabelColor(QColor labelColor)
update();
}

void XAxisWidget::changeEvent(QEvent* event)
{
if (event->type() == QEvent::PaletteChange)
{
label_color_ = palette().color(QPalette::WindowText);
update();
}
QWidget::changeEvent(event);
}

//-----------------------------------------------------------------------------
void XAxisWidget::paintEvent(QPaintEvent*)
{
Expand Down
1 change: 1 addition & 0 deletions src/gui/signal_browser/x_axis_widget_4.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ public slots:
virtual void paintEvent(QPaintEvent*);
virtual void contextMenuEvent (QContextMenuEvent* event);
virtual void timerEvent (QTimerEvent* event);
virtual void changeEvent(QEvent* event);

QSharedPointer<SignalViewSettings const> signal_view_settings_;
float64 intervall_;
Expand Down
12 changes: 11 additions & 1 deletion src/gui/signal_browser/y_axis_widget_4.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ YAxisWidget::YAxisWidget (QWidget* parent, QSharedPointer<const SignalViewSettin
channel_height_ (0),
y_start_ (0),
signal_view_settings_ (signal_view_settings),
label_color_ (Qt::black)
label_color_ (palette().color(QPalette::WindowText))
{
// nothing to do here
}
Expand Down Expand Up @@ -83,6 +83,16 @@ void YAxisWidget::changeLabelColor(QColor labelColor)
update();
}

void YAxisWidget::changeEvent(QEvent* event)
{
if (event->type() == QEvent::PaletteChange)
{
label_color_ = palette().color(QPalette::WindowText);
update();
}
QWidget::changeEvent(event);
}

//!this section is set to be consistent with label_widget.cpp----------------
void YAxisWidget::paintEvent(QPaintEvent*)
{
Expand Down
1 change: 1 addition & 0 deletions src/gui/signal_browser/y_axis_widget_4.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ public slots:
private:
virtual void paintEvent (QPaintEvent* event = 0);
virtual void contextMenuEvent (QContextMenuEvent* event);
virtual void changeEvent(QEvent* event);

void paintYAxisLabels (QPainter* painter, float64 offset,
float64 y_grid_pixel_intervall,
Expand Down
Loading