Skip to content

Commit

Permalink
fix: adjust toolbar position to avoid content overlap
Browse files Browse the repository at this point in the history
- Adjust toolbar position to prevent blocking content area
  during screenshot/recording
- Optimize toolbar placement for better user experience

Log: Avoid content overlap.
Bug: https://pms.uniontech.com/bug-view-296639.html
  • Loading branch information
rb-union authored and deepin-bot[bot] committed Dec 30, 2024
1 parent cde2ed0 commit 429791d
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,17 +82,18 @@ int main(int argc, char *argv[])

QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);

QDBusInterface scaleFactor("com.deepin.daemon.Display", "/com/deepin/XSettings", "com.deepin.XSettings");
// Support V23 or later.
QDBusInterface scaleFactor("org.deepin.dde.Display1", "/org/deepin/dde/XSettings1", "org.deepin.dde.XSettings1");
if (scaleFactor.isValid()) {
qDebug()<< "com.deepin.XSettings is available";
qDebug()<< "org.deepin.dde.XSettings1 is available";
QDBusReply<double> replay = scaleFactor.call(QStringLiteral("GetScaleFactor"));
double factor = replay.value();
if (factor > 0) {
qDebug() << "scaleFactor available value: " << factor;
qputenv("QT_SCALE_FACTOR", QString::number(1 / factor, 'g', 2).toLatin1());
}
} else {
qDebug()<< "com.deepin.XSettings is not available";
qDebug()<< "org.deepin.dde.XSettings1 is not available";
}

// 平板模式
Expand Down

0 comments on commit 429791d

Please sign in to comment.