几乎完成

This commit is contained in:
Mike Solar
2023-08-18 19:09:55 +08:00
parent bc3b3f69a7
commit b728e697fb
33 changed files with 1299 additions and 1182 deletions

View File

@ -1,4 +1,4 @@
//
//
// Created by HW on 2023/07/26.
//
#include "MyButton.h"
@ -10,6 +10,7 @@ MyButton::MyButton(ButtonStruct &buttonStruct,int width,int height,QList<MyButto
this->height2=height;
this->text=buttonStruct.text;
this->op = buttonStruct.op;
this->orig_name = buttonStruct.orig_name;
this->func = buttonStruct.func;
this->url = buttonStruct.url;
this->path = buttonStruct.path;
@ -43,7 +44,7 @@ void MyButton::paintEvent(QPaintEvent *e) {
setContentsMargins(0,0,0,0);
QFont ft;
ft.setPixelSize(TEXT_SIZE);
//<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊɶ<EFBFBD><EFBFBD>3<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ҳ<EFBFBD><EFBFBD>֪<EFBFBD><EFBFBD>
//别问我为啥乘3我也不知道
int text_x=(width()-TEXT_SIZE*text.length()*scale*3)/2;
int text_y=(logo_width+logo_y+10);
QRectF logo_rect(logo_x, logo_y, logo_width, logo_width);
@ -91,6 +92,6 @@ void MyButton::mouseReleaseEvent(QMouseEvent *event) {
checked=false;
else
checked=true;
emit clicked1(op, func, url, path, initial_position);
emit clicked1(orig_name,op, func, url, path, initial_position);
}