mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-10-17 14:36:45 +00:00
Allow selecting country in passport.
This commit is contained in:
@@ -35,8 +35,12 @@ int LinkButton::naturalWidth() const {
|
||||
void LinkButton::paintEvent(QPaintEvent *e) {
|
||||
Painter p(this);
|
||||
|
||||
auto &font = (isOver() ? _st.overFont : _st.font);
|
||||
auto &pen = (isOver() ? _st.overColor : _st.color);
|
||||
const auto &font = (isOver() ? _st.overFont : _st.font);
|
||||
const auto pen = _textFgOverride.has_value()
|
||||
? QPen(*_textFgOverride)
|
||||
: isOver()
|
||||
? _st.overColor
|
||||
: _st.color;
|
||||
p.setFont(font);
|
||||
p.setPen(pen);
|
||||
const auto left = _st.padding.left();
|
||||
@@ -56,6 +60,11 @@ void LinkButton::setText(const QString &text) {
|
||||
update();
|
||||
}
|
||||
|
||||
void LinkButton::setColorOverride(base::optional<QColor> textFg) {
|
||||
_textFgOverride = textFg;
|
||||
update();
|
||||
}
|
||||
|
||||
void LinkButton::onStateChanged(State was, StateChangeSource source) {
|
||||
update();
|
||||
}
|
||||
|
Reference in New Issue
Block a user