提交测试,基本完成

This commit is contained in:
Mike Solar
2023-08-13 12:16:22 +08:00
parent b8da134809
commit 098e06a39b
40 changed files with 3219 additions and 1782 deletions

View File

@ -1,8 +1,9 @@
//
// Created by HW on 2023/07/26.
//
#define TEXT_SIZE 7
#include "MyButton.h"
#include "config.h"
MyButton::MyButton(ButtonStruct &buttonStruct,int width,int height,QList<MyButton *> *buttons,QWidget *parent) : QPushButton(parent) {
this->buttons=buttons;
this->width2=width;
@ -30,7 +31,11 @@ MyButton::~MyButton() {
void MyButton::paintEvent(QPaintEvent *e) {
QPushButton::paintEvent(e);
QPainter painter(this);
QRectF rect(0, 0, this->width(), this->height());
QColor qColor;
qColor.setNamedColor(background_color);
QPainter painter(this);
painter.fillRect(rect, qColor);
painter.setRenderHint(QPainter::Antialiasing);
int logo_width=width()/3;
int logo_x=width()/3;