Merge branch 'work/dark_theme_fix' into 'develop'

Fix dark theme issues

See merge request ems/astdm/modeling.dram/dram.sys!341
This commit is contained in:
Lukas Steiner
2022-02-16 09:45:05 +00:00
6 changed files with 11 additions and 14 deletions

View File

@@ -69,7 +69,7 @@ void Phase::draw(QPainter *painter, const QwtScaleMap &xMap,
if (!line->isCollapsed())
{
drawPhaseSymbol(span.Begin(), span.End(), line->getYVal(),
drawingProperties.drawText, getPhaseSymbol(), painter, xMap, yMap);
drawingProperties.drawText, getPhaseSymbol(), painter, xMap, yMap, drawingProperties.textColor);
if (getGranularity() == Granularity::Bankwise)
{
@@ -90,7 +90,7 @@ void Phase::draw(QPainter *painter, const QwtScaleMap &xMap,
for (auto commandBusLine : drawingProperties.getCommandBusLines())
{
drawPhaseSymbol(span.Begin(), span.End(), commandBusLine->getYVal(),
false, PhaseSymbol::Hexagon, painter, xMap, yMap);
false, PhaseSymbol::Hexagon, painter, xMap, yMap, drawingProperties.textColor);
}
}
@@ -99,14 +99,14 @@ void Phase::draw(QPainter *painter, const QwtScaleMap &xMap,
for (auto dataBusLine : drawingProperties.getDataBusLines())
{
drawPhaseSymbol(spanOnDataBus->Begin(), spanOnDataBus->End(), dataBusLine->getYVal(),
false, PhaseSymbol::Hexagon, painter, xMap, yMap);
false, PhaseSymbol::Hexagon, painter, xMap, yMap, drawingProperties.textColor);
}
}
}
void Phase::drawPhaseSymbol(traceTime begin, traceTime end, double y,
bool drawtext, PhaseSymbol symbol, QPainter *painter, const QwtScaleMap &xMap,
const QwtScaleMap &yMap) const
const QwtScaleMap &yMap, QColor textColor) const
{
double yVal = yMap.transform(y);
double symbolHeight = yMap.transform(0) - yMap.transform(hexagonHeight);
@@ -126,7 +126,7 @@ void Phase::drawPhaseSymbol(traceTime begin, traceTime end, double y,
if (drawtext)
drawText(painter, Name(), QPoint(static_cast<int>(xMap.transform(begin)),
static_cast<int>(yVal + symbolHeight / 2)), TextPositioning::bottomRight);
static_cast<int>(yVal + symbolHeight / 2)), TextPositioning::bottomRight, textColor);
}
void Phase::drawPhaseDependencies(traceTime begin, traceTime end, double y,

View File

@@ -99,7 +99,7 @@ protected:
virtual QColor getPhaseColor() const = 0;
virtual void drawPhaseSymbol(traceTime begin, traceTime end, double y,
bool drawtext, PhaseSymbol symbol, QPainter *painter, const QwtScaleMap &xMap,
const QwtScaleMap &yMap) const;
const QwtScaleMap &yMap, QColor textColor) const;
virtual void drawPhaseDependencies(traceTime begin, traceTime end, double y,
const TraceDrawingProperties &drawingProperties, QPainter *painter,
const QwtScaleMap &xMap, const QwtScaleMap &yMap) const;

View File

@@ -92,6 +92,7 @@ public:
bool drawBorder;
DependencyOptions drawDependenciesOption;
ColorGrouping colorGrouping;
QColor textColor;
unsigned int numberOfRanks = 1;
unsigned int numberOfBankGroups = 1;

View File

@@ -302,6 +302,7 @@ void TracePlot::setUpDrawingProperties()
{
drawingProperties.init(navigator->getTracePlotLines(), navigator->getTracePlotLineCache(), this);
drawingProperties.textColor = palette().text().color();
drawingProperties.numberOfRanks = navigator->GeneralTraceInfo().numberOfRanks;
drawingProperties.numberOfBankGroups = navigator->GeneralTraceInfo().numberOfBankGroups;
drawingProperties.numberOfBanks = navigator->GeneralTraceInfo().numberOfBanks;

View File

@@ -106,6 +106,7 @@ void TraceScroller::setUpDrawingProperties()
{
drawingProperties.init(navigator->getTracePlotLines(), navigator->getTracePlotLineCache());
drawingProperties.textColor = palette().text().color();
drawingProperties.numberOfRanks = navigator->GeneralTraceInfo().numberOfRanks;
drawingProperties.numberOfBankGroups = navigator->GeneralTraceInfo().numberOfBankGroups;
drawingProperties.numberOfBanks = navigator->GeneralTraceInfo().numberOfBanks;

View File

@@ -67,9 +67,6 @@
<property name="autoFillBackground">
<bool>true</bool>
</property>
<property name="styleSheet">
<string notr="true"/>
</property>
<property name="widgetResizable">
<bool>true</bool>
</property>
@@ -78,13 +75,10 @@
<rect>
<x>0</x>
<y>0</y>
<width>469</width>
<height>599</height>
<width>467</width>
<height>597</height>
</rect>
</property>
<property name="styleSheet">
<string notr="true">background-color:white</string>
</property>
</widget>
</widget>
</widget>