Skip to content

Commit

Permalink
fix: the w525 device of monitor display
Browse files Browse the repository at this point in the history
fix the w525 device of monitor display

Log: fix the w525 device of monitor display

Task: https://pms.uniontech.com/task-view-368603.html
  • Loading branch information
add-uos authored and max-lvs committed Dec 17, 2024
1 parent d6a9c9f commit 02ee8d0
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions deepin-devicemanager/src/DeviceManager/DeviceMonitor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -327,12 +327,19 @@ bool DeviceMonitor::setMainInfoFromXrandr(const QString &info, const QString &ra
QRegExp rateStart("[a-zA-Z]");
int pos = curRate.indexOf(rateStart);
if (pos > 0 && curRate.size() > pos && !Common::boardVendorType().isEmpty()) {
curRate = QString::number(ceil(curRate.left(pos).toDouble())) + curRate.right(curRate.size() - pos);
if (Common::specialComType == 1) {
curRate = QString::number(ceil(curRate.left(pos).toDouble())) + ".00" + curRate.right(curRate.size() - pos);
} else {
curRate = QString::number(ceil(curRate.left(pos).toDouble())) + curRate.right(curRate.size() - pos);
}
}
if (Common::specialComType == 1) {
m_RefreshRate = QString("%1").arg(curRate);
}
if (Common::specialComType == 5) {
m_CurrentResolution = QString("%1").arg(reScreenSize.cap(1));
} else {
m_CurrentResolution = QString("%1@%2").arg(reScreenSize.cap(1)).arg(curRate);
m_CurrentResolution = QString("%1 @%2").arg(reScreenSize.cap(1)).arg(curRate);
}
} else
m_CurrentResolution = QString("%1").arg(reScreenSize.cap(1));
Expand Down

0 comments on commit 02ee8d0

Please sign in to comment.