forked from github_mirror/framelesshelper
Minor improvements.
Signed-off-by: Yuhang Zhao <2546789017@qq.com>
This commit is contained in:
parent
6a12cb1a30
commit
d671fd703d
16
README.md
16
README.md
|
@ -4,7 +4,21 @@ If you are using part of or all the code from this repository in your own projec
|
||||||
|
|
||||||
如果您正在使用此项目的部分或全部代码,这是我的荣幸,我很高兴能帮到您,但我同时也希望,您能将您项目的首页或仓库的网址告诉我(闭源或收费都没关系),我将在这个自述文件中链接到您所提供的网址,以供展示。如果您能一并提供一些软件运行时的截图,那就更好了。
|
如果您正在使用此项目的部分或全部代码,这是我的荣幸,我很高兴能帮到您,但我同时也希望,您能将您项目的首页或仓库的网址告诉我(闭源或收费都没关系),我将在这个自述文件中链接到您所提供的网址,以供展示。如果您能一并提供一些软件运行时的截图,那就更好了。
|
||||||
|
|
||||||
## Screenshots
|
## Screenshots - Win32
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
## Screenshots - Cross platform
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
|
|
@ -2,15 +2,17 @@
|
||||||
|
|
||||||
## Screenshots
|
## Screenshots
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||

|

|
||||||
|
|
||||||

|

|
||||||
|
|
||||||

|

|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
## Features
|
## Features
|
||||||
|
|
||||||
|
|
|
@ -155,6 +155,8 @@ Widget::Widget(QWidget *parent) : QWidget(parent), ui(new Ui::Widget)
|
||||||
ui->forceAcrylicCB->setEnabled(m_bIsWin101803OrGreater);
|
ui->forceAcrylicCB->setEnabled(m_bIsWin101803OrGreater);
|
||||||
if (shouldDrawBorder()) {
|
if (shouldDrawBorder()) {
|
||||||
layout()->setContentsMargins(1, 1, 1, 1);
|
layout()->setContentsMargins(1, 1, 1, 1);
|
||||||
|
} else {
|
||||||
|
layout()->setContentsMargins(0, 0, 0, 0);
|
||||||
}
|
}
|
||||||
updateTitleBar();
|
updateTitleBar();
|
||||||
|
|
||||||
|
@ -213,7 +215,7 @@ Widget::Widget(QWidget *parent) : QWidget(parent), ui(new Ui::Widget)
|
||||||
});
|
});
|
||||||
connect(ui->blurEffectCB, &QCheckBox::stateChanged, this, [this](int state) {
|
connect(ui->blurEffectCB, &QCheckBox::stateChanged, this, [this](int state) {
|
||||||
const bool enable = state == Qt::Checked;
|
const bool enable = state == Qt::Checked;
|
||||||
QColor color = Qt::white;
|
QColor color = {0, 0, 0, 127};
|
||||||
if (m_bIsWin101803OrGreater && ui->forceAcrylicCB->isChecked()) {
|
if (m_bIsWin101803OrGreater && ui->forceAcrylicCB->isChecked()) {
|
||||||
if (enable && m_bShowColorDialog) {
|
if (enable && m_bShowColorDialog) {
|
||||||
color = QColorDialog::getColor(color,
|
color = QColorDialog::getColor(color,
|
||||||
|
@ -280,6 +282,11 @@ bool Widget::shouldDrawThemedBorder(const bool ignoreWindowState) const
|
||||||
return (shouldDrawBorder(ignoreWindowState) && isThemeColorEnabled());
|
return (shouldDrawBorder(ignoreWindowState) && isThemeColorEnabled());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool Widget::shouldDrawThemedTitleBar() const
|
||||||
|
{
|
||||||
|
return m_bIsWin10OrGreater && isThemeColorEnabled();
|
||||||
|
}
|
||||||
|
|
||||||
QColor Widget::activeBorderColor() const
|
QColor Widget::activeBorderColor() const
|
||||||
{
|
{
|
||||||
return isThemeColorEnabled() ? m_cThemeColor : m_cDefaultActiveBorderColor;
|
return isThemeColorEnabled() ? m_cThemeColor : m_cDefaultActiveBorderColor;
|
||||||
|
@ -387,7 +394,7 @@ void Widget::paintEvent(QPaintEvent *event)
|
||||||
|
|
||||||
void Widget::updateTitleBar()
|
void Widget::updateTitleBar()
|
||||||
{
|
{
|
||||||
const bool themedTitleBar = shouldDrawThemedBorder(true) && isActiveWindow();
|
const bool themedTitleBar = shouldDrawThemedTitleBar() && isActiveWindow();
|
||||||
if (themedTitleBar && !m_bExtendToTitleBar) {
|
if (themedTitleBar && !m_bExtendToTitleBar) {
|
||||||
ui->minimizeButton->setIcon(QIcon(QLatin1String(":/images/button_minimize_white.svg")));
|
ui->minimizeButton->setIcon(QIcon(QLatin1String(":/images/button_minimize_white.svg")));
|
||||||
ui->closeButton->setIcon(QIcon(QLatin1String(":/images/button_close_white.svg")));
|
ui->closeButton->setIcon(QIcon(QLatin1String(":/images/button_close_white.svg")));
|
||||||
|
@ -446,7 +453,7 @@ void Widget::updateTitleBar()
|
||||||
void Widget::initWindow()
|
void Widget::initWindow()
|
||||||
{
|
{
|
||||||
if (m_bIsWin10OrGreater) {
|
if (m_bIsWin10OrGreater) {
|
||||||
ui->preserveWindowFrameCB->click();
|
//ui->preserveWindowFrameCB->click();
|
||||||
if (m_bIsWin101803OrGreater) {
|
if (m_bIsWin101803OrGreater) {
|
||||||
ui->forceAcrylicCB->click();
|
ui->forceAcrylicCB->click();
|
||||||
}
|
}
|
||||||
|
|
|
@ -55,6 +55,7 @@ public:
|
||||||
|
|
||||||
bool shouldDrawBorder(const bool ignoreWindowState = false) const;
|
bool shouldDrawBorder(const bool ignoreWindowState = false) const;
|
||||||
bool shouldDrawThemedBorder(const bool ignoreWindowState = false) const;
|
bool shouldDrawThemedBorder(const bool ignoreWindowState = false) const;
|
||||||
|
bool shouldDrawThemedTitleBar() const;
|
||||||
|
|
||||||
QColor activeBorderColor() const;
|
QColor activeBorderColor() const;
|
||||||
QColor inactiveBorderColor() const;
|
QColor inactiveBorderColor() const;
|
||||||
|
|
Binary file not shown.
After Width: | Height: | Size: 28 KiB |
Binary file not shown.
After Width: | Height: | Size: 27 KiB |
Binary file not shown.
After Width: | Height: | Size: 1.1 MiB |
Binary file not shown.
After Width: | Height: | Size: 1006 KiB |
Binary file not shown.
After Width: | Height: | Size: 1.1 MiB |
Binary file not shown.
After Width: | Height: | Size: 905 KiB |
Loading…
Reference in New Issue