kylin-screenshot/0003-change-kylin-screenshot-to-screenshot.patch
2022-06-24 14:46:55 +08:00

72 lines
3.1 KiB
Diff

From 03e592209248d972d491dc39a0b189002a9eb8ae Mon Sep 17 00:00:00 2001
From: peijiankang <peijiankang@kylinos.cn>
Date: Fri, 24 Jun 2022 13:58:39 +0800
Subject: [PATCH] change kylin-screenshot to screenshot
---
src/core/controller.cpp | 2 +-
src/widgets/capture/buttonhandler.cpp | 5 +++--
src/widgets/capturelauncher.cpp | 1 +
src/widgets/infowindow.cpp | 2 +-
4 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/src/core/controller.cpp b/src/core/controller.cpp
index fd70486..6cd047d 100755
--- a/src/core/controller.cpp
+++ b/src/core/controller.cpp
@@ -257,7 +257,7 @@ void Controller::enableTrayIcon() {
trayIconMenu->addAction(quitAction);
m_trayIcon = new QSystemTrayIcon();
- m_trayIcon->setToolTip(tr("Kylin-Screenshot"));
+ m_trayIcon->setToolTip(tr("Screenshot"));
m_trayIcon->setContextMenu(trayIconMenu);
//QIcon trayicon = QIcon::fromTheme("kylin-screenshot-tray", QIcon("/usr/share/icons/ukui-icon-theme-default/128x128/apps/kylin-screenshot.png"));
QIcon trayicon = QIcon("/usr/share/icons/ukui-icon-theme-default/128x128/apps/kylin-screenshot.png");
diff --git a/src/widgets/capture/buttonhandler.cpp b/src/widgets/capture/buttonhandler.cpp
index 5604b91..4086078 100755
--- a/src/widgets/capture/buttonhandler.cpp
+++ b/src/widgets/capture/buttonhandler.cpp
@@ -336,10 +336,11 @@ void ButtonHandler::positionButtonsInside(int index) {
// selection.
QRect mainArea = m_selection;
mainArea = intersectWithAreas(mainArea);
- const int buttonsPerRow = (mainArea.width()) / (m_buttonExtendedSize);
+ /*const int buttonsPerRow = (mainArea.width()) / (m_buttonExtendedSize);
if (buttonsPerRow == 0) {
return;
- }
+ }*/
+ const int buttonsPerRow = 19;
QPoint center = QPoint(mainArea.center().x(),
mainArea.bottom() - m_buttonExtendedSize);
diff --git a/src/widgets/capturelauncher.cpp b/src/widgets/capturelauncher.cpp
index 278ba77..d36e716 100755
--- a/src/widgets/capturelauncher.cpp
+++ b/src/widgets/capturelauncher.cpp
@@ -41,6 +41,7 @@ CaptureLauncher::CaptureLauncher(QWidget *parent) :
QWidget(parent), m_id(0)
{
setWindowIcon(QIcon("/usr/share/icons/ukui-icon-theme-default/128x128/apps/kylin-screenshot.png"));
+ setWindowTitle(tr("Screenshot"));
setAttribute(Qt::WA_DeleteOnClose);
connect(Controller::getInstance(), &Controller::captureTaken,
this, &CaptureLauncher::captureTaken);
diff --git a/src/widgets/infowindow.cpp b/src/widgets/infowindow.cpp
index 6f1e5ad..b0508f0 100755
--- a/src/widgets/infowindow.cpp
+++ b/src/widgets/infowindow.cpp
@@ -188,7 +188,7 @@ void InfoWindow::initLabels() {
QLabel *versionTitleLabel = new QLabel(tr("<u><b>Version</b></u>"), this);
versionTitleLabel->setAlignment(Qt::AlignHCenter);
m_layout->addWidget(versionTitleLabel);
- QString versionMsg = tr("Kylin-ScreenShot") + "v1.0.0" + "\n" +
+ QString versionMsg = tr("ScreenShot") + "v1.0.0" + "\n" +
tr("Compiled with Qt")
+ QT_VERSION_STR;
QLabel *versionLabel = new QLabel(versionMsg, this);
--
2.33.0