UI/Qt: Move cursor to the front

Fix long URLs showing the end instead of domain
This commit is contained in:
Sidicer 2024-08-17 03:28:28 +03:00 committed by Tim Ledbetter
parent e926b4cbfb
commit c380dcf15e
Notes: github-actions[bot] 2024-08-20 18:52:08 +00:00

View file

@ -73,6 +73,7 @@ void LocationEdit::focusOutEvent(QFocusEvent* event)
if (text().isEmpty())
setText(qstring_from_ak_string(m_url.serialize()));
}
setCursorPosition(0);
highlight_location();
}
@ -134,6 +135,7 @@ void LocationEdit::set_url(URL::URL const& url)
clear();
} else {
setText(qstring_from_ak_string(url.serialize()));
setCursorPosition(0);
}
}