Skip to content

Commit

Permalink
Traktor: Fixed some missing theme of SequencerControl is Dark theme. …
Browse files Browse the repository at this point in the history
…Also calculate height of time info same as status bar.
  • Loading branch information
apistol78 committed Apr 30, 2024
1 parent bdf20d9 commit 0da7dd9
Show file tree
Hide file tree
Showing 2 changed files with 89 additions and 90 deletions.
13 changes: 6 additions & 7 deletions code/Ui/Sequencer/SequencerControl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,16 @@
#include "Ui/Sequencer/SequenceItem.h"
#include "Ui/Sequencer/SequenceMovedEvent.h"

namespace traktor
namespace traktor::ui
{
namespace ui
namespace
{
namespace
{

const Unit c_preferedHeightMargin = 2_ut;
const Unit c_sequenceHeight = 25_ut;
const int c_endWidth = 200;

}
}

T_IMPLEMENT_RTTI_CLASS(L"traktor.ui.SequencerControl", SequencerControl, Widget)

Expand Down Expand Up @@ -568,9 +567,10 @@ void SequencerControl::eventPaint(PaintEvent* event)
}

// Draw time information.
const int32_t infoHeight = getFontMetric().getHeight() + pixel(c_preferedHeightMargin) * 2;
const Rect rcTime(
rc.left,
rc.bottom - pixel(23_ut),
rc.bottom - infoHeight,
rc.left + m_separator,
rc.bottom
);
Expand Down Expand Up @@ -599,5 +599,4 @@ void SequencerControl::eventScroll(ScrollEvent* event)
event->consume();
}

}
}
166 changes: 83 additions & 83 deletions resources/runtime/themes/Dark/StyleSheet.xss
Original file line number Diff line number Diff line change
Expand Up @@ -684,6 +684,61 @@
</item>
</colors>
</item>
<item>
<typeName>traktor.ui.Sequence</typeName>
<colors>
<item>
<first>background-color</first>
<second>55, 55, 55, 255</second>
</item>
<item>
<first>background-color-selected</first>
<second>90, 90, 90, 255</second>
</item>
<item>
<first>line-color</first>
<second>160, 160, 160, 255</second>
</item>
<item>
<first>tick-color</first>
<second>128, 128, 128, 255</second>
</item>
</colors>
</item>
<item>
<typeName>traktor.ui.SequenceGroup</typeName>
<colors>
<item>
<first>background-color</first>
<second>120, 120, 120, 255</second>
</item>
<item>
<first>background-color-selected</first>
<second>153, 153, 153, 255</second>
</item>
</colors>
</item>
<item>
<typeName>traktor.ui.SequencerControl</typeName>
<colors>
<item>
<first>background-color</first>
<second>40, 40, 40, 255</second>
</item>
<item>
<first>control-background-color</first>
<second>45, 45, 45, 255</second>
</item>
<item>
<first>cursor-color</first>
<second>0, 122, 204, 255</second>
</item>
<item>
<first>info-background-color</first>
<second>0, 122, 204, 255</second>
</item>
</colors>
</item>
<item>
<typeName>traktor.ui.ShortcutEdit</typeName>
<colors>
Expand Down Expand Up @@ -840,6 +895,23 @@
</item>
</colors>
</item>
<item>
<typeName>traktor.ui.Tick</typeName>
<colors>
<item>
<first>background-color</first>
<second>51, 153, 255, 255</second>
</item>
<item>
<first>background-color-selected</first>
<second>96, 139, 78, 255</second>
</item>
<item>
<first>color</first>
<second>63, 63, 70, 255</second>
</item>
</colors>
</item>
<item>
<typeName>traktor.ui.ToolBar</typeName>
<colors>
Expand Down Expand Up @@ -882,117 +954,45 @@
</colors>
</item>
<item>
<typeName>traktor.ui.TreeView</typeName>
<typeName>traktor.ui.Track</typeName>
<colors>
<item>
<first>background-color</first>
<second>37, 37, 38, 255</second>
</item>
</colors>
</item>
<item>
<typeName>traktor.ui.TreeViewItem</typeName>
<colors>
<item>
<first>background-color-selected</first>
<second>51, 153, 255, 255</second>
</item>
<item>
<first>color-selected</first>
<second>255, 255, 255, 255</second>
</item>
<item>
<first>color-selected-disabled</first>
<second>180, 180, 180, 255</second>
</item>
</colors>
</item>
<item>
<typeName>traktor.ui.Sequence</typeName>
<colors>
<item>
<first>background-color</first>
<second>55, 55, 55, 255</second>
</item>
<item>
<first>background-color-selected</first>
<second>90, 90, 90, 255</second>
</item>
<item>
<first>line-color</first>
<second>160, 160, 160, 255</second>
</item>
<item>
<first>tick-color</first>
<second>128, 128, 128, 255</second>
</item>
</colors>
</item>
<item>
<typeName>traktor.ui.SequenceGroup</typeName>
<colors>
<item>
<first>background-color</first>
<second>120, 120, 120, 255</second>
<second>96, 139, 78, 255</second>
</item>
<item>
<first>background-color-selected</first>
<second>153, 153, 153, 255</second>
<first>color</first>
<second>63, 63, 70, 255</second>
</item>
</colors>
</item>
<item>
<typeName>traktor.ui.SequencerControl</typeName>
<typeName>traktor.ui.TreeView</typeName>
<colors>
<item>
<first>background-color</first>
<second>37, 37, 38, 0</second>
</item>
<item>
<first>control-background-color</first>
<second>55, 55, 55, 255</second>
</item>
<item>
<first>cursor-color</first>
<second>0, 122, 204, 255</second>
</item>
<item>
<first>info-background-color</first>
<second>0, 122, 204, 255</second>
<second>37, 37, 38, 255</second>
</item>
</colors>
</item>
<item>
<typeName>traktor.ui.Tick</typeName>
<typeName>traktor.ui.TreeViewItem</typeName>
<colors>
<item>
<first>background-color</first>
<second>51, 153, 255, 255</second>
</item>
<item>
<first>background-color-selected</first>
<second>96, 139, 78, 255</second>
</item>
<item>
<first>color</first>
<second>63, 63, 70, 255</second>
</item>
</colors>
</item>
<item>
<typeName>traktor.ui.Track</typeName>
<colors>
<item>
<first>background-color</first>
<second>51, 153, 255, 255</second>
</item>
<item>
<first>background-color-selected</first>
<second>96, 139, 78, 255</second>
<first>color-selected</first>
<second>255, 255, 255, 255</second>
</item>
<item>
<first>color</first>
<second>63, 63, 70, 255</second>
<first>color-selected-disabled</first>
<second>180, 180, 180, 255</second>
</item>
</colors>
</item>
Expand Down

0 comments on commit 0da7dd9

Please sign in to comment.