Qt render bug fixed by patch. Design improvements and fixes.

This commit is contained in:
John Preston
2016-11-17 14:03:49 +03:00
parent 07689476a6
commit d0f7c6c210
11 changed files with 114 additions and 66 deletions
@@ -112,7 +112,8 @@ void MainMenu::updateControlsGeometry() {
void MainMenu::paintEvent(QPaintEvent *e) {
Painter p(this);
auto cover = QRect(0, 0, width(), st::mainMenuCoverHeight).intersected(e->rect());
auto clip = e->rect();
auto cover = QRect(0, 0, width(), st::mainMenuCoverHeight).intersected(clip);
if (!cover.isEmpty()) {
p.fillRect(cover, st::mainMenuCoverBg);
p.setPen(st::mainMenuCoverFg);
@@ -123,7 +124,7 @@ void MainMenu::paintEvent(QPaintEvent *e) {
p.drawTextLeft(st::mainMenuCoverTextLeft, st::mainMenuCoverStatusTop, width(), qsl("online"));
}
}
auto other = QRect(0, st::mainMenuCoverHeight, width(), height() - st::mainMenuCoverHeight);
auto other = QRect(0, st::mainMenuCoverHeight, width(), height() - st::mainMenuCoverHeight).intersected(clip);
if (!other.isEmpty()) {
p.fillRect(other, st::mainMenuBg);
}
@@ -37,6 +37,9 @@ class MainMenu : public TWidget, private base::Subscriber {
public:
MainMenu(QWidget *parent);
void setInnerFocus() {
setFocus();
}
void showFinished();
protected: