Introduce SimpleTextFloat

Introduce the new class SimpleTextFloat which simply shows a text and
that works like a pseudo tool tip with a narrow margin. It was extracted
from TextFloat to adhere to the single responsibility principle.

The new class is used by:
* Fader: display the current volume when moving the fader
* Knob: display the current value when the knob is moved
* PianoRoll: display the current value when setting the note volume and
  panning

Add stylings for the new widget in style.css.
This commit is contained in:
Michael Gregorius
2023-01-10 19:20:26 +01:00
parent 6dfdafe1f7
commit 17295a4f86
11 changed files with 143 additions and 17 deletions

View File

@@ -70,7 +70,7 @@ QToolTip {
color: #4afd85;
}
lmms--gui--TextFloat {
lmms--gui--TextFloat, lmms--gui--SimpleTextFloat {
border-radius: 4px;
background: qlineargradient(spread:reflect, x1:0.5, y1:0.5, x2:0.5, y2:0, stop:0 rgba(0, 0, 0, 255), stop:1 rgba(50, 50, 50, 220));
opacity: 175;

View File

@@ -100,7 +100,7 @@ QToolTip {
color: #d1d8e4;
}
lmms--gui--TextFloat {
lmms--gui--TextFloat, lmms--gui--SimpleTextFloat {
background: #040506;
color: #d1d8e4;
}