diff --git a/OfficeAssistant_msvc.VC.db b/OfficeAssistant_msvc.VC.db index 3ceebf0..afee156 100644 Binary files a/OfficeAssistant_msvc.VC.db and b/OfficeAssistant_msvc.VC.db differ diff --git a/OfficeAssistant_msvc/MyButton.cpp b/OfficeAssistant_msvc/MyButton.cpp index 611c0db..3602c43 100644 --- a/OfficeAssistant_msvc/MyButton.cpp +++ b/OfficeAssistant_msvc/MyButton.cpp @@ -33,10 +33,11 @@ void MyButton::paintEvent(QPaintEvent *e) { setContentsMargins(0,0,0,0); QFont ft; ft.setPixelSize(TEXT_SIZE); - int text_x=(width()-TEXT_SIZE*text.length()*scale*2)/2; + //别问我为啥乘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); - QRectF text_rect(text_x,text_y, TEXT_SIZE*text.length()*scale*2,TEXT_SIZE*scale*2); + QRectF text_rect(text_x,text_y, TEXT_SIZE*text.length()*scale*3,TEXT_SIZE*scale*3); if(checked){ painter.setPen(text_cover_color); diff --git a/OfficeAssistant_msvc/mainscreen.cpp b/OfficeAssistant_msvc/mainscreen.cpp index 099f63f..36c90c3 100644 --- a/OfficeAssistant_msvc/mainscreen.cpp +++ b/OfficeAssistant_msvc/mainscreen.cpp @@ -92,6 +92,7 @@ void MainScreen::clickButton1(QString text, QString url) { void MainScreen::startWeChat() { QString path = QApplication::applicationDirPath(); QString exe = path + "/app/wxdk.exe"; + path.replace("/", "\\"); ShellExecute(GetDesktopWindow(), L"open", exe.toStdWString().c_str(), L"79c86fb12b36dfa33d1a537c9af100b4c7928a9c", path.toStdWString().c_str(), SW_SHOW); } //void MainScreen::resizeEvent(QResizeEvent *event) { diff --git a/OfficeAssistant_msvc/mainwindowlayout.cpp b/OfficeAssistant_msvc/mainwindowlayout.cpp index ceb9dfe..16ce6a7 100644 --- a/OfficeAssistant_msvc/mainwindowlayout.cpp +++ b/OfficeAssistant_msvc/mainwindowlayout.cpp @@ -54,6 +54,7 @@ void MainWindowLayout::resizeEvent(QResizeEvent *event) { void MainWindowLayout::clickButton(QString text, QString url) { QString path = QApplication::applicationDirPath(); path += "/app/startcalc.exe"; + path.replace("/", "\\"); if (text== QString::fromLocal8Bit("计算器")) { WinExec(path.toStdString().c_str(), SW_SHOW); }