mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-02-24 17:26:58 +00:00
Moved out level meter widget to td_ui.
This commit is contained in:
parent
6f1457d30d
commit
0459196982
@ -1459,8 +1459,6 @@ PRIVATE
|
||||
ui/image/image_location.h
|
||||
ui/image/image_location_factory.cpp
|
||||
ui/image/image_location_factory.h
|
||||
ui/widgets/level_meter.cpp
|
||||
ui/widgets/level_meter.h
|
||||
ui/countryinput.cpp
|
||||
ui/countryinput.h
|
||||
ui/dynamic_thumbnails.cpp
|
||||
|
@ -24,7 +24,7 @@ void LevelMeter::setValue(float value) {
|
||||
|
||||
void LevelMeter::paintEvent(QPaintEvent* event) {
|
||||
auto p = QPainter(this);
|
||||
PainterHighQualityEnabler hq(p);
|
||||
auto hq = PainterHighQualityEnabler(p);
|
||||
|
||||
p.setPen(Qt::NoPen);
|
||||
|
||||
@ -34,7 +34,7 @@ void LevelMeter::paintEvent(QPaintEvent* event) {
|
||||
const auto rect = QRect(0, 0, _st.lineWidth, height());
|
||||
p.setBrush(activeFg);
|
||||
for (auto i = 0; i < _st.lineCount; ++i) {
|
||||
const auto valueAtLine = (float)(i + 1) / _st.lineCount;
|
||||
const auto valueAtLine = (float64)(i + 1) / _st.lineCount;
|
||||
if (valueAtLine > _value) {
|
||||
p.setBrush(inactiveFg);
|
||||
}
|
||||
|
@ -383,6 +383,8 @@ PRIVATE
|
||||
ui/widgets/discrete_sliders.h
|
||||
ui/widgets/gradient_round_button.cpp
|
||||
ui/widgets/gradient_round_button.h
|
||||
ui/widgets/level_meter.cpp
|
||||
ui/widgets/level_meter.h
|
||||
ui/widgets/multi_select.cpp
|
||||
ui/widgets/multi_select.h
|
||||
ui/widgets/sent_code_field.cpp
|
||||
|
Loading…
Reference in New Issue
Block a user