Giter VIP home page Giter VIP logo

Comments (2)

czyt1988 avatar czyt1988 commented on August 13, 2024

我没有高清屏没做过相关测试,这三个按钮是QPushButton,使用的是系统的图标

buttonClose = new QPushButton(par);
                buttonClose->setObjectName(QStringLiteral("SACloseWindowButton"));
                buttonClose->setFixedSize(40,30);
                //buttonClose->setFlat(true);
                par->connect(buttonClose,&QAbstractButton::clicked
                             ,par,&SAWindowButtonGroup::closeWindow);
                buttonClose->setStyleSheet(QString("QPushButton "
                                                   "{ "
                                                   "    background-color: #E3E3E5; "
                                                   "    border:none;"
                                                   "}"
                                                   "QPushButton:hover {background-color:#F0604D}"
                                                   "QPushButton:pressed {background-color:#F0604D}"
                                                   "QPushButton:focus{outline: none;}"));
                QIcon icon = par->style()->standardIcon(QStyle::SP_TitleBarCloseButton);
                buttonClose->setIcon(icon);

我不清楚它和其它程序比会大多数,不过你可以通过修改源码的:SAWindowButtonGroup.cpp下对图标进行设置。后续会考虑提供SAWindowButtonGroup的接口

from saribbon.

K-JW avatar K-JW commented on August 13, 2024

这样确实可以调节这三个按钮的大小,但是总感觉不是特别完美。谢谢帮助。

from saribbon.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.