Move standard buttons to lib_ui.

This commit is contained in:
John Preston
2019-09-13 19:45:48 +03:00
parent a16c6ca41a
commit c057f28425
45 changed files with 330 additions and 150 deletions

View File

@@ -46,7 +46,7 @@ void BackButton::paintEvent(QPaintEvent *e) {
void BackButton::onStateChanged(State was, StateChangeSource source) {
if (isDown() && !(was & StateFlag::Down)) {
emit clicked();
clicked(Qt::KeyboardModifiers(), Qt::LeftButton);
}
}

View File

@@ -38,9 +38,7 @@ protected:
int resizeGetHeight(int newWidth) override = 0;
void contentSizeUpdated() {
auto oldHeight = height();
resizeToWidth(width());
emit heightUpdated();
}
PeerData *peer() const {