From 86337b103f4ddc971da0dcdf4d1c7047a6ff94a8 Mon Sep 17 00:00:00 2001 From: metanoia1989 Date: Sat, 24 Oct 2020 14:43:01 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0QPushButton=E5=9B=BE=E6=A0=87?= =?UTF-8?q?=E5=B7=A6=E5=AF=B9=E9=BD=90=E7=9A=84=E7=A4=BA=E4=BE=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 73 ++++++++++ QProxyStyleTest/.gitignore | 73 ++++++++++ QProxyStyleTest/QProxyStyleTest.pro | 29 ++++ QProxyStyleTest/icons.qrc | 36 +++++ QProxyStyleTest/icons/category_active.svg | 125 ++++++++++++++++++ .../icons/category_active_dark.svg | 124 +++++++++++++++++ QProxyStyleTest/icons/category_chat.svg | 3 + QProxyStyleTest/icons/category_chat_dark.svg | 3 + QProxyStyleTest/icons/category_develop.svg | 3 + .../icons/category_develop_dark.svg | 3 + QProxyStyleTest/icons/category_game.svg | 3 + QProxyStyleTest/icons/category_game_dark.svg | 3 + QProxyStyleTest/icons/category_graphic.svg | 3 + .../icons/category_graphic_dark.svg | 3 + QProxyStyleTest/icons/category_music.svg | 3 + QProxyStyleTest/icons/category_music_dark.svg | 3 + QProxyStyleTest/icons/category_network.svg | 3 + .../icons/category_network_dark.svg | 3 + QProxyStyleTest/icons/category_office.svg | 3 + .../icons/category_office_dark.svg | 3 + QProxyStyleTest/icons/category_others.svg | 3 + .../icons/category_others_dark.svg | 3 + QProxyStyleTest/icons/category_reading.svg | 6 + .../icons/category_reading_dark.svg | 6 + QProxyStyleTest/icons/category_system.svg | 3 + .../icons/category_system_dark.svg | 3 + QProxyStyleTest/icons/category_video.svg | 3 + QProxyStyleTest/icons/category_video_dark.svg | 3 + QProxyStyleTest/icons/downloads-symbolic.svg | 3 + .../icons/downloads-symbolic_dark.svg | 57 ++++++++ QProxyStyleTest/icons/homepage.svg | 68 ++++++++++ QProxyStyleTest/icons/homepage_dark.svg | 68 ++++++++++ QProxyStyleTest/icons/refresh-page-dark.svg | 54 ++++++++ QProxyStyleTest/icons/refresh-page.svg | 52 ++++++++ QProxyStyleTest/icons/theme-symbolic.svg | 3 + QProxyStyleTest/icons/theme-symbolic_dark.svg | 57 ++++++++ QProxyStyleTest/main.cpp | 12 ++ QProxyStyleTest/menubtnstyle.cpp | 119 +++++++++++++++++ QProxyStyleTest/menubtnstyle.h | 14 ++ QProxyStyleTest/screenshot.png | Bin 0 -> 31177 bytes QProxyStyleTest/widget.cpp | 34 +++++ QProxyStyleTest/widget.h | 24 ++++ QProxyStyleTest/widget.ui | 119 +++++++++++++++++ README.md | 11 ++ 44 files changed, 1227 insertions(+) create mode 100644 .gitignore create mode 100644 QProxyStyleTest/.gitignore create mode 100644 QProxyStyleTest/QProxyStyleTest.pro create mode 100644 QProxyStyleTest/icons.qrc create mode 100644 QProxyStyleTest/icons/category_active.svg create mode 100644 QProxyStyleTest/icons/category_active_dark.svg create mode 100644 QProxyStyleTest/icons/category_chat.svg create mode 100644 QProxyStyleTest/icons/category_chat_dark.svg create mode 100644 QProxyStyleTest/icons/category_develop.svg create mode 100644 QProxyStyleTest/icons/category_develop_dark.svg create mode 100644 QProxyStyleTest/icons/category_game.svg create mode 100644 QProxyStyleTest/icons/category_game_dark.svg create mode 100644 QProxyStyleTest/icons/category_graphic.svg create mode 100644 QProxyStyleTest/icons/category_graphic_dark.svg create mode 100644 QProxyStyleTest/icons/category_music.svg create mode 100644 QProxyStyleTest/icons/category_music_dark.svg create mode 100644 QProxyStyleTest/icons/category_network.svg create mode 100644 QProxyStyleTest/icons/category_network_dark.svg create mode 100644 QProxyStyleTest/icons/category_office.svg create mode 100644 QProxyStyleTest/icons/category_office_dark.svg create mode 100644 QProxyStyleTest/icons/category_others.svg create mode 100644 QProxyStyleTest/icons/category_others_dark.svg create mode 100644 QProxyStyleTest/icons/category_reading.svg create mode 100644 QProxyStyleTest/icons/category_reading_dark.svg create mode 100644 QProxyStyleTest/icons/category_system.svg create mode 100644 QProxyStyleTest/icons/category_system_dark.svg create mode 100644 QProxyStyleTest/icons/category_video.svg create mode 100644 QProxyStyleTest/icons/category_video_dark.svg create mode 100644 QProxyStyleTest/icons/downloads-symbolic.svg create mode 100644 QProxyStyleTest/icons/downloads-symbolic_dark.svg create mode 100644 QProxyStyleTest/icons/homepage.svg create mode 100644 QProxyStyleTest/icons/homepage_dark.svg create mode 100644 QProxyStyleTest/icons/refresh-page-dark.svg create mode 100644 QProxyStyleTest/icons/refresh-page.svg create mode 100644 QProxyStyleTest/icons/theme-symbolic.svg create mode 100644 QProxyStyleTest/icons/theme-symbolic_dark.svg create mode 100644 QProxyStyleTest/main.cpp create mode 100644 QProxyStyleTest/menubtnstyle.cpp create mode 100644 QProxyStyleTest/menubtnstyle.h create mode 100644 QProxyStyleTest/screenshot.png create mode 100644 QProxyStyleTest/widget.cpp create mode 100644 QProxyStyleTest/widget.h create mode 100644 QProxyStyleTest/widget.ui create mode 100644 README.md diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..fab7372 --- /dev/null +++ b/.gitignore @@ -0,0 +1,73 @@ +# This file is used to ignore files which are generated +# ---------------------------------------------------------------------------- + +*~ +*.autosave +*.a +*.core +*.moc +*.o +*.obj +*.orig +*.rej +*.so +*.so.* +*_pch.h.cpp +*_resource.rc +*.qm +.#* +*.*# +core +!core/ +tags +.DS_Store +.directory +*.debug +Makefile* +*.prl +*.app +moc_*.cpp +ui_*.h +qrc_*.cpp +Thumbs.db +*.res +*.rc +/.qmake.cache +/.qmake.stash + +# qtcreator generated files +*.pro.user* + +# xemacs temporary files +*.flc + +# Vim temporary files +.*.swp + +# Visual Studio generated files +*.ib_pdb_index +*.idb +*.ilk +*.pdb +*.sln +*.suo +*.vcproj +*vcproj.*.*.user +*.ncb +*.sdf +*.opensdf +*.vcxproj +*vcxproj.* + +# MinGW generated files +*.Debug +*.Release + +# Python byte code +*.pyc + +# Binaries +# -------- +*.dll +*.exe + diff --git a/QProxyStyleTest/.gitignore b/QProxyStyleTest/.gitignore new file mode 100644 index 0000000..fab7372 --- /dev/null +++ b/QProxyStyleTest/.gitignore @@ -0,0 +1,73 @@ +# This file is used to ignore files which are generated +# ---------------------------------------------------------------------------- + +*~ +*.autosave +*.a +*.core +*.moc +*.o +*.obj +*.orig +*.rej +*.so +*.so.* +*_pch.h.cpp +*_resource.rc +*.qm +.#* +*.*# +core +!core/ +tags +.DS_Store +.directory +*.debug +Makefile* +*.prl +*.app +moc_*.cpp +ui_*.h +qrc_*.cpp +Thumbs.db +*.res +*.rc +/.qmake.cache +/.qmake.stash + +# qtcreator generated files +*.pro.user* + +# xemacs temporary files +*.flc + +# Vim temporary files +.*.swp + +# Visual Studio generated files +*.ib_pdb_index +*.idb +*.ilk +*.pdb +*.sln +*.suo +*.vcproj +*vcproj.*.*.user +*.ncb +*.sdf +*.opensdf +*.vcxproj +*vcxproj.* + +# MinGW generated files +*.Debug +*.Release + +# Python byte code +*.pyc + +# Binaries +# -------- +*.dll +*.exe + diff --git a/QProxyStyleTest/QProxyStyleTest.pro b/QProxyStyleTest/QProxyStyleTest.pro new file mode 100644 index 0000000..b66e980 --- /dev/null +++ b/QProxyStyleTest/QProxyStyleTest.pro @@ -0,0 +1,29 @@ +QT += core gui + +greaterThan(QT_MAJOR_VERSION, 4): QT += widgets + +CONFIG += c++11 + +# You can make your code fail to compile if it uses deprecated APIs. +# In order to do so, uncomment the following line. +#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 + +SOURCES += \ + main.cpp \ + menubtnstyle.cpp \ + widget.cpp + +HEADERS += \ + menubtnstyle.h \ + widget.h + +FORMS += \ + widget.ui + +RESOURCES += \ + icons.qrc + +# Default rules for deployment. +qnx: target.path = /tmp/$${TARGET}/bin +else: unix:!android: target.path = /opt/$${TARGET}/bin +!isEmpty(target.path): INSTALLS += target diff --git a/QProxyStyleTest/icons.qrc b/QProxyStyleTest/icons.qrc new file mode 100644 index 0000000..b2012b3 --- /dev/null +++ b/QProxyStyleTest/icons.qrc @@ -0,0 +1,36 @@ + + + icons/category_chat_dark.svg + icons/category_chat.svg + icons/category_develop_dark.svg + icons/category_develop.svg + icons/category_game_dark.svg + icons/category_game.svg + icons/category_graphic_dark.svg + icons/category_graphic.svg + icons/category_music_dark.svg + icons/category_music.svg + icons/category_network_dark.svg + icons/category_network.svg + icons/category_office_dark.svg + icons/category_office.svg + icons/category_others_dark.svg + icons/category_others.svg + icons/category_reading_dark.svg + icons/category_reading.svg + icons/category_system_dark.svg + icons/category_system.svg + icons/category_video_dark.svg + icons/category_video.svg + icons/downloads-symbolic_dark.svg + icons/downloads-symbolic.svg + icons/theme-symbolic_dark.svg + icons/theme-symbolic.svg + icons/homepage.svg + icons/homepage_dark.svg + icons/category_active_dark.svg + icons/category_active.svg + icons/refresh-page-dark.svg + icons/refresh-page.svg + + diff --git a/QProxyStyleTest/icons/category_active.svg b/QProxyStyleTest/icons/category_active.svg new file mode 100644 index 0000000..4757164 --- /dev/null +++ b/QProxyStyleTest/icons/category_active.svg @@ -0,0 +1,125 @@ + + + + + + image/svg+xml + + category_active_16px + + + + + + category_active_16px + Created with Sketch. + + + + + + + + + + + + + + + diff --git a/QProxyStyleTest/icons/category_active_dark.svg b/QProxyStyleTest/icons/category_active_dark.svg new file mode 100644 index 0000000..5cce038 --- /dev/null +++ b/QProxyStyleTest/icons/category_active_dark.svg @@ -0,0 +1,124 @@ + + + + + + image/svg+xml + + + + + + + category_active_16px + Created with Sketch. + + + + + + + + + + + + + + + diff --git a/QProxyStyleTest/icons/category_chat.svg b/QProxyStyleTest/icons/category_chat.svg new file mode 100644 index 0000000..e7c8d01 --- /dev/null +++ b/QProxyStyleTest/icons/category_chat.svg @@ -0,0 +1,3 @@ + + + diff --git a/QProxyStyleTest/icons/category_chat_dark.svg b/QProxyStyleTest/icons/category_chat_dark.svg new file mode 100644 index 0000000..af65c4c --- /dev/null +++ b/QProxyStyleTest/icons/category_chat_dark.svg @@ -0,0 +1,3 @@ + + + diff --git a/QProxyStyleTest/icons/category_develop.svg b/QProxyStyleTest/icons/category_develop.svg new file mode 100644 index 0000000..d2e646b --- /dev/null +++ b/QProxyStyleTest/icons/category_develop.svg @@ -0,0 +1,3 @@ + + + diff --git a/QProxyStyleTest/icons/category_develop_dark.svg b/QProxyStyleTest/icons/category_develop_dark.svg new file mode 100644 index 0000000..0d40bfe --- /dev/null +++ b/QProxyStyleTest/icons/category_develop_dark.svg @@ -0,0 +1,3 @@ + + + diff --git a/QProxyStyleTest/icons/category_game.svg b/QProxyStyleTest/icons/category_game.svg new file mode 100644 index 0000000..9271fa9 --- /dev/null +++ b/QProxyStyleTest/icons/category_game.svg @@ -0,0 +1,3 @@ + + + diff --git a/QProxyStyleTest/icons/category_game_dark.svg b/QProxyStyleTest/icons/category_game_dark.svg new file mode 100644 index 0000000..a783c5d --- /dev/null +++ b/QProxyStyleTest/icons/category_game_dark.svg @@ -0,0 +1,3 @@ + + + diff --git a/QProxyStyleTest/icons/category_graphic.svg b/QProxyStyleTest/icons/category_graphic.svg new file mode 100644 index 0000000..07c4b4e --- /dev/null +++ b/QProxyStyleTest/icons/category_graphic.svg @@ -0,0 +1,3 @@ + + + diff --git a/QProxyStyleTest/icons/category_graphic_dark.svg b/QProxyStyleTest/icons/category_graphic_dark.svg new file mode 100644 index 0000000..904d02f --- /dev/null +++ b/QProxyStyleTest/icons/category_graphic_dark.svg @@ -0,0 +1,3 @@ + + + diff --git a/QProxyStyleTest/icons/category_music.svg b/QProxyStyleTest/icons/category_music.svg new file mode 100644 index 0000000..c544799 --- /dev/null +++ b/QProxyStyleTest/icons/category_music.svg @@ -0,0 +1,3 @@ + + + diff --git a/QProxyStyleTest/icons/category_music_dark.svg b/QProxyStyleTest/icons/category_music_dark.svg new file mode 100644 index 0000000..8541c83 --- /dev/null +++ b/QProxyStyleTest/icons/category_music_dark.svg @@ -0,0 +1,3 @@ + + + diff --git a/QProxyStyleTest/icons/category_network.svg b/QProxyStyleTest/icons/category_network.svg new file mode 100644 index 0000000..0cc2948 --- /dev/null +++ b/QProxyStyleTest/icons/category_network.svg @@ -0,0 +1,3 @@ + + + diff --git a/QProxyStyleTest/icons/category_network_dark.svg b/QProxyStyleTest/icons/category_network_dark.svg new file mode 100644 index 0000000..a8368b4 --- /dev/null +++ b/QProxyStyleTest/icons/category_network_dark.svg @@ -0,0 +1,3 @@ + + + diff --git a/QProxyStyleTest/icons/category_office.svg b/QProxyStyleTest/icons/category_office.svg new file mode 100644 index 0000000..dec8fdd --- /dev/null +++ b/QProxyStyleTest/icons/category_office.svg @@ -0,0 +1,3 @@ + + + diff --git a/QProxyStyleTest/icons/category_office_dark.svg b/QProxyStyleTest/icons/category_office_dark.svg new file mode 100644 index 0000000..872cb0e --- /dev/null +++ b/QProxyStyleTest/icons/category_office_dark.svg @@ -0,0 +1,3 @@ + + + diff --git a/QProxyStyleTest/icons/category_others.svg b/QProxyStyleTest/icons/category_others.svg new file mode 100644 index 0000000..0d57844 --- /dev/null +++ b/QProxyStyleTest/icons/category_others.svg @@ -0,0 +1,3 @@ + + + diff --git a/QProxyStyleTest/icons/category_others_dark.svg b/QProxyStyleTest/icons/category_others_dark.svg new file mode 100644 index 0000000..a9a36c5 --- /dev/null +++ b/QProxyStyleTest/icons/category_others_dark.svg @@ -0,0 +1,3 @@ + + + diff --git a/QProxyStyleTest/icons/category_reading.svg b/QProxyStyleTest/icons/category_reading.svg new file mode 100644 index 0000000..7c87ac1 --- /dev/null +++ b/QProxyStyleTest/icons/category_reading.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/QProxyStyleTest/icons/category_reading_dark.svg b/QProxyStyleTest/icons/category_reading_dark.svg new file mode 100644 index 0000000..4736cb4 --- /dev/null +++ b/QProxyStyleTest/icons/category_reading_dark.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/QProxyStyleTest/icons/category_system.svg b/QProxyStyleTest/icons/category_system.svg new file mode 100644 index 0000000..7655669 --- /dev/null +++ b/QProxyStyleTest/icons/category_system.svg @@ -0,0 +1,3 @@ + + + diff --git a/QProxyStyleTest/icons/category_system_dark.svg b/QProxyStyleTest/icons/category_system_dark.svg new file mode 100644 index 0000000..fdccd06 --- /dev/null +++ b/QProxyStyleTest/icons/category_system_dark.svg @@ -0,0 +1,3 @@ + + + diff --git a/QProxyStyleTest/icons/category_video.svg b/QProxyStyleTest/icons/category_video.svg new file mode 100644 index 0000000..7fcebeb --- /dev/null +++ b/QProxyStyleTest/icons/category_video.svg @@ -0,0 +1,3 @@ + + + diff --git a/QProxyStyleTest/icons/category_video_dark.svg b/QProxyStyleTest/icons/category_video_dark.svg new file mode 100644 index 0000000..0c90fad --- /dev/null +++ b/QProxyStyleTest/icons/category_video_dark.svg @@ -0,0 +1,3 @@ + + + diff --git a/QProxyStyleTest/icons/downloads-symbolic.svg b/QProxyStyleTest/icons/downloads-symbolic.svg new file mode 100644 index 0000000..f386246 --- /dev/null +++ b/QProxyStyleTest/icons/downloads-symbolic.svg @@ -0,0 +1,3 @@ + + + diff --git a/QProxyStyleTest/icons/downloads-symbolic_dark.svg b/QProxyStyleTest/icons/downloads-symbolic_dark.svg new file mode 100644 index 0000000..8cb7209 --- /dev/null +++ b/QProxyStyleTest/icons/downloads-symbolic_dark.svg @@ -0,0 +1,57 @@ + + + + + + image/svg+xml + + + + + + + + diff --git a/QProxyStyleTest/icons/homepage.svg b/QProxyStyleTest/icons/homepage.svg new file mode 100644 index 0000000..d9e8144 --- /dev/null +++ b/QProxyStyleTest/icons/homepage.svg @@ -0,0 +1,68 @@ + + + + + + image/svg+xml + + + + + + + + category_recommend + Created with Sketch. + + + + diff --git a/QProxyStyleTest/icons/homepage_dark.svg b/QProxyStyleTest/icons/homepage_dark.svg new file mode 100644 index 0000000..d69bc55 --- /dev/null +++ b/QProxyStyleTest/icons/homepage_dark.svg @@ -0,0 +1,68 @@ + + + + + + image/svg+xml + + + + + + + + category_recommend + Created with Sketch. + + + + diff --git a/QProxyStyleTest/icons/refresh-page-dark.svg b/QProxyStyleTest/icons/refresh-page-dark.svg new file mode 100644 index 0000000..38b924c --- /dev/null +++ b/QProxyStyleTest/icons/refresh-page-dark.svg @@ -0,0 +1,54 @@ + +image/svg+xml + + + + diff --git a/QProxyStyleTest/icons/refresh-page.svg b/QProxyStyleTest/icons/refresh-page.svg new file mode 100644 index 0000000..bab5516 --- /dev/null +++ b/QProxyStyleTest/icons/refresh-page.svg @@ -0,0 +1,52 @@ + +image/svg+xml + + + + diff --git a/QProxyStyleTest/icons/theme-symbolic.svg b/QProxyStyleTest/icons/theme-symbolic.svg new file mode 100644 index 0000000..d3a6344 --- /dev/null +++ b/QProxyStyleTest/icons/theme-symbolic.svg @@ -0,0 +1,3 @@ + + + diff --git a/QProxyStyleTest/icons/theme-symbolic_dark.svg b/QProxyStyleTest/icons/theme-symbolic_dark.svg new file mode 100644 index 0000000..57352c4 --- /dev/null +++ b/QProxyStyleTest/icons/theme-symbolic_dark.svg @@ -0,0 +1,57 @@ + + + + + + image/svg+xml + + + + + + + + diff --git a/QProxyStyleTest/main.cpp b/QProxyStyleTest/main.cpp new file mode 100644 index 0000000..e7f2ffe --- /dev/null +++ b/QProxyStyleTest/main.cpp @@ -0,0 +1,12 @@ +#include "widget.h" +#include "menubtnstyle.h" +#include + +int main(int argc, char *argv[]) +{ + QApplication a(argc, argv); + a.setStyle(new MenuBtnStyle); + Widget w; + w.show(); + return a.exec(); +} diff --git a/QProxyStyleTest/menubtnstyle.cpp b/QProxyStyleTest/menubtnstyle.cpp new file mode 100644 index 0000000..c9cbb37 --- /dev/null +++ b/QProxyStyleTest/menubtnstyle.cpp @@ -0,0 +1,119 @@ +#include "menubtnstyle.h" +#include +#include +#include + +void MenuBtnStyle::drawControl(QStyle::ControlElement element, const QStyleOption *option, + QPainter *painter, const QWidget *widget) const +{ + if (element == QStyle::CE_PushButtonLabel) { + const QStyleOptionButton *btnOption = qstyleoption_cast(option); + QStyleOptionButton new_option = *btnOption; + QIcon icon = btnOption->icon; + new_option.icon = QIcon(); + QProxyStyle::drawControl(element, &new_option, painter, widget); + + if (icon.isNull()) return; + QIcon::Mode mode = btnOption->state & State_Enabled ? QIcon::Normal : QIcon::Disabled; + if (mode == QIcon::Normal && btnOption->state & State_HasFocus) + mode = QIcon::Active; + QIcon::State state = QIcon::Off; + if (btnOption->state & State_On) + state = QIcon::On; + QWindow *window = widget == nullptr ? nullptr : widget->window()->windowHandle(); + QPixmap pixmap = icon.pixmap(window, btnOption->iconSize, mode, state); + int pixmapWidth = pixmap.width() / pixmap.devicePixelRatio(); + int pixmapHeight = pixmap.height() / pixmap.devicePixelRatio(); + + QRect iconRect = QRect(QPoint(), QSize(pixmapWidth, pixmapHeight)); + int iconSpacing = 4; + iconRect.moveCenter(btnOption->rect.center()); + iconRect.moveLeft(btnOption->rect.left() + iconSpacing); + iconRect = visualRect(btnOption->direction, btnOption->rect, iconRect); + iconRect.translate(proxy()->pixelMetric(PM_ButtonShiftHorizontal, btnOption, widget), + proxy()->pixelMetric(PM_ButtonShiftVertical, btnOption, widget)); + painter->drawPixmap(iconRect, pixmap); + } else { + // 其他的control,使用默认渲染机制 + QProxyStyle::drawControl(element, option, painter, widget); + } +} + + +//void MenuBtnStyle::drawControl(QStyle::ControlElement element, const QStyleOption *option, +// QPainter *painter, const QWidget *widget) const +//{ +// if(element==CE_PushButtonLabel) +// { +// if (const QStyleOptionButton *button = qstyleoption_cast(option)) +// { +// QRect textRect = button->rect; +// uint tf = Qt::AlignVCenter | Qt::TextShowMnemonic; +// if (!proxy()->styleHint(SH_UnderlineShortcut, button, widget)) +// tf |= Qt::TextHideMnemonic; + +// if (!button->icon.isNull()) { +// QRect iconRect; +// QIcon::Mode mode = button->state & State_Enabled ? QIcon::Normal : QIcon::Disabled; +// if (mode == QIcon::Normal && button->state & State_HasFocus) +// mode = QIcon::Active; +// QIcon::State state = QIcon::Off; +// if (button->state & State_On) +// state = QIcon::On; + +// QWindow *window = widget == nullptr ? nullptr : widget->window()->windowHandle(); +// QPixmap pixmap = button->icon.pixmap(window, button->iconSize, mode, state); + +// int pixmapWidth = pixmap.width() / pixmap.devicePixelRatio(); +// int pixmapHeight = pixmap.height() / pixmap.devicePixelRatio(); +// int labelWidth = pixmapWidth; +// int labelHeight = pixmapHeight; +// int iconSpacing = 4;//### 4 is currently hardcoded in QPushButton::sizeHint() +// int textWidth = button->fontMetrics.boundingRect(option->rect, tf, button->text).width(); +// if (!button->text.isEmpty()) +// labelWidth += (textWidth + iconSpacing); + +// /*************************************************************/ +// // Make the icon rectangle always be 10px in from the left edge +// /*************************************************************/ +// iconRect = QRect(10, +// textRect.y() + (textRect.height() - labelHeight) / 2, +// pixmapWidth, pixmapHeight); + +// iconRect = visualRect(button->direction, textRect, iconRect); + +// /***********************************/ +// // Always horizontal align the text +// /***********************************/ +// tf |= Qt::AlignHCenter; + + +// if (button->state & (State_On | State_Sunken)) +// iconRect.translate(proxy()->pixelMetric(PM_ButtonShiftHorizontal, option, widget), +// proxy()->pixelMetric(PM_ButtonShiftVertical, option, widget)); +// painter->drawPixmap(iconRect, pixmap); +// } else { +// tf |= Qt::AlignHCenter; +// } +// if (button->state & (State_On | State_Sunken)) +// textRect.translate(proxy()->pixelMetric(PM_ButtonShiftHorizontal, option, widget), +// proxy()->pixelMetric(PM_ButtonShiftVertical, option, widget)); + +// if (button->features & QStyleOptionButton::HasMenu) { +// int indicatorSize = proxy()->pixelMetric(PM_MenuButtonIndicator, button, widget); +// if (button->direction == Qt::LeftToRight) +// textRect = textRect.adjusted(0, 0, -indicatorSize, 0); +// else +// textRect = textRect.adjusted(indicatorSize, 0, 0, 0); +// } +// proxy()->drawItemText(painter, textRect, tf, button->palette, (button->state & State_Enabled), +// button->text, QPalette::ButtonText); +// } + +// qDebug() << "调用了吗???"; +// return; +// } + +// // For all other controls, draw the default +// QProxyStyle::drawControl(element, option, painter, widget); +//} diff --git a/QProxyStyleTest/menubtnstyle.h b/QProxyStyleTest/menubtnstyle.h new file mode 100644 index 0000000..96208ae --- /dev/null +++ b/QProxyStyleTest/menubtnstyle.h @@ -0,0 +1,14 @@ +#ifndef MENUBTNSTYLE_H +#define MENUBTNSTYLE_H + +#include +#include + +class MenuBtnStyle : public QProxyStyle +{ +public: + void drawControl(ControlElement element, const QStyleOption *option, + QPainter *painter, const QWidget *widget = nullptr) const override; +}; + +#endif // MENUBTNSTYLE_H diff --git a/QProxyStyleTest/screenshot.png b/QProxyStyleTest/screenshot.png new file mode 100644 index 0000000000000000000000000000000000000000..9c9f82760d8dded0e0a09e64ba2fe134495dcead GIT binary patch literal 31177 zcmZs@by$>d)HO;CEujpdlpx{I-KBIR4bn)blypmjlz?=1w{$2SBAwFR-QUgc{oZq3 z=Q?Np7{__WC+^sL?X}i6L{VPi8Tw0fI5@axQj(${;Nak~;NTF%P!Yg4**THzaB$>s zQlcU%U*PvrT|WMuUFyk3keimlg{EXoX)1lkgvRer78eAs?z9~Ez7Q2tvR5DuZh$g` z28SXl5@lg3arVZ%u5S8epMJaQn){aJ`|Hy0W1ok~&erx0X|CDLWlp|^hJ^_|B!&tj zpu<6SpzTBO22_FPZ`s(`UcY{g^(F&Ok(`kcd}L#L!G@yJE^~c-?ds~<*Vo6x!=u;c zb-(oZppNofF~gJYsO|CoaCfR48~}&Gj}&!1rKP2dii#|jR(!U65h7?6RaN8T;*i!) zK8TBpyScehmI~u4!qFz=cM`5k|Fj(J?SA^Kc6~@p^}bNQAsR*a(WjlTgL>p%}!p_VYtvP1;*oc}HJTTIG$i;Ii>b=$m1$jH1e z4;C({dxlf_BErL`tvE@q#&TsA=I6u1!~OjIk2?vNbiehj1!0q|Pz@P-m8%kBeoabB zQdBD}Eadrelu=*LRVN9Hm;Pw&>dKQOyV&OKt)oMdDxc12JsV4-@PkXJ(w%SQeYtK6 zSWVfAwEJ?wM@M$7Np~y1FzD?V6D+N)hzSX~-7oegiq%&why^_oWvQpYTun@TGByTR z9vxL|uFJ^KpD0qz7LNc!s?p?ZEhQBa9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/QProxyStyleTest/widget.cpp b/QProxyStyleTest/widget.cpp new file mode 100644 index 0000000..ed6b241 --- /dev/null +++ b/QProxyStyleTest/widget.cpp @@ -0,0 +1,34 @@ +#include "widget.h" +#include "ui_widget.h" + +Widget::Widget(QWidget *parent) + : QWidget(parent) + , ui(new Ui::Widget) +{ + ui->setupUi(this); + initUI(); +} + +void Widget::initUI() +{ + ui->pushButton->setIcon(QIcon(":/icons/icons/homepage.svg")); + ui->pushButton_2->setIcon(QIcon(":/icons/icons/category_network.svg")); + ui->pushButton_3->setIcon(QIcon(":/icons/icons/category_chat.svg")); + ui->pushButton_4->setIcon(QIcon(":/icons/icons/category_music.svg")); + ui->pushButton_5->setIcon(QIcon(":/icons/icons/category_video.svg")); + ui->pushButton_6->setIcon(QIcon(":/icons/icons/category_graphic.svg")); + ui->pushButton_7->setIcon(QIcon(":/icons/icons/category_game.svg")); + ui->pushButton_8->setIcon(QIcon(":/icons/icons/category_office.svg")); + ui->pushButton_9->setIcon(QIcon(":/icons/icons/category_reading.svg")); + ui->pushButton_10->setIcon(QIcon(":/icons/icons/category_develop.svg")); + ui->pushButton_11->setIcon(QIcon(":/icons/icons/category_system.svg")); + ui->pushButton_12->setIcon(QIcon(":/icons/icons/theme-symbolic.svg")); + ui->pushButton_13->setIcon(QIcon(":/icons/icons/category_others.svg")); + ui->pushButton_14->setIcon(QIcon(":/icons/icons/downloads-symbolic.svg")); +} + +Widget::~Widget() +{ + delete ui; +} + diff --git a/QProxyStyleTest/widget.h b/QProxyStyleTest/widget.h new file mode 100644 index 0000000..77ad46b --- /dev/null +++ b/QProxyStyleTest/widget.h @@ -0,0 +1,24 @@ +#ifndef WIDGET_H +#define WIDGET_H + +#include + +QT_BEGIN_NAMESPACE +namespace Ui { class Widget; } +QT_END_NAMESPACE + +class Widget : public QWidget +{ + Q_OBJECT + +public: + Widget(QWidget *parent = nullptr); + ~Widget(); + +private: + void initUI(); + +private: + Ui::Widget *ui; +}; +#endif // WIDGET_H diff --git a/QProxyStyleTest/widget.ui b/QProxyStyleTest/widget.ui new file mode 100644 index 0000000..f561bb4 --- /dev/null +++ b/QProxyStyleTest/widget.ui @@ -0,0 +1,119 @@ + + + Widget + + + + 0 + 0 + 267 + 547 + + + + Widget + + + + + + Home + + + + + + + Network + + + + + + + Communication + + + + + + + Music + + + + + + + Videos + + + + + + + Graphics + + + + + + + Games + + + + + + + Office + + + + + + + Translate + + + + + + + Development + + + + + + + Tools + + + + + + + Beautify + + + + + + + Others + + + + + + + Download List + + + + + + + + diff --git a/README.md b/README.md new file mode 100644 index 0000000..9a9b38c --- /dev/null +++ b/README.md @@ -0,0 +1,11 @@ +# 星火开发组Qt Demo +放一些大家写的Demo,方便参考学习和测试。 + + +## QPushButton 图标左对齐文字剧中 +[QProxyStyleTest](./QProxyStyleTest/) 参考以下的内容 +* qpushbutton icon left alignment text center alignment 「Python实现的代码很简洁」https://stackoverflow.com/questions/56129402/qpushbutton-icon-left-alignment-text-center-alignment +* QPushButton icon aligned left with text centered 「第二个回答就是,但是好复杂唉」 https://stackoverflow.com/questions/44091339/qpushbutton-icon-aligned-left-with-text-centered + +![](./QProxyStyleTest/screenshot.png) +