mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-09-02 15:45:12 +00:00
Fix theme preview layout.
This commit is contained in:
@@ -1639,17 +1639,13 @@ void InputField::paintEvent(QPaintEvent *e) {
|
||||
|
||||
p.restore();
|
||||
} else if (!_placeholder.isEmpty()) {
|
||||
auto placeholderHiddenDegree = _a_placeholderShifted.value(_placeholderShifted ? 1. : 0.);
|
||||
const auto placeholderHiddenDegree = _a_placeholderShifted.value(_placeholderShifted ? 1. : 0.);
|
||||
if (placeholderHiddenDegree < 1.) {
|
||||
p.setOpacity(1. - placeholderHiddenDegree);
|
||||
p.save();
|
||||
p.setClipRect(r);
|
||||
|
||||
auto placeholderLeft = anim::interpolate(0, -_st.placeholderShift, placeholderHiddenDegree);
|
||||
|
||||
QRect r(rect().marginsRemoved(_st.textMargins + _st.placeholderMargins));
|
||||
r.moveLeft(r.left() + placeholderLeft);
|
||||
if (rtl()) r.moveLeft(width() - r.left() - r.width());
|
||||
const auto placeholderLeft = anim::interpolate(0, -_st.placeholderShift, placeholderHiddenDegree);
|
||||
|
||||
p.setFont(_st.placeholderFont);
|
||||
p.setPen(anim::pen(_st.placeholderFg, _st.placeholderFgActive, focusedDegree));
|
||||
|
Reference in New Issue
Block a user