mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-08-31 14:45:14 +00:00
Alpha 1.0.1: resize chats list with mouse press-and-drag.
Also fixed drag-n-drop images from Firefox in Windows. Also some additional colors added to themes palette: HistoryToDown button now has separate colors. Windows title bar and buttons have separate active/inactive colors.
This commit is contained in:
@@ -59,11 +59,11 @@ TitleWidget::TitleWidget(MainWindow *parent, int height) : Window::TitleWidget(p
|
||||
void TitleWidget::paintEvent(QPaintEvent *e) {
|
||||
Painter p(this);
|
||||
|
||||
p.fillRect(rect(), st::titleBg);
|
||||
auto active = isActiveWindow();
|
||||
p.fillRect(rect(), active ? st::titleBgActive : st::titleBg);
|
||||
|
||||
p.setPen(isActiveWindow() ? st::titleFgActive : st::titleFg);
|
||||
p.setFont(_font);
|
||||
|
||||
p.setPen(active ? st::titleFgActive : st::titleFg);
|
||||
p.drawText(rect(), static_cast<MainWindow*>(parentWidget())->titleText(), style::al_center);
|
||||
}
|
||||
|
||||
@@ -121,7 +121,7 @@ QImage PreviewWindowSystemButton(QColor inner, QColor border) {
|
||||
void PreviewWindowTitle(Painter &p, const style::palette &palette, QRect body, int titleHeight, int outerWidth) {
|
||||
auto titleRect = QRect(body.x(), body.y() - titleHeight, body.width(), titleHeight);
|
||||
p.fillRect(titleRect, QColor(0, 0, 0));
|
||||
p.fillRect(titleRect, st::titleBg[palette]);
|
||||
p.fillRect(titleRect, st::titleBgActive[palette]);
|
||||
p.fillRect(titleRect.x(), titleRect.y() + titleRect.height() - st::lineWidth, titleRect.width(), st::lineWidth, st::titleShadow[palette]);
|
||||
|
||||
auto useSystemFont = false;
|
||||
|
Reference in New Issue
Block a user