- fix: menu font size is wrong when dpi changed
This commit is contained in:
parent
ecf567b13f
commit
d93a41e496
2
NEWS.md
2
NEWS.md
|
@ -9,7 +9,7 @@ Red Panda C++ Version 0.14.5
|
||||||
- enhancement: add option "hide symbols start with underscore" and "hide synbols start with two underscore"
|
- enhancement: add option "hide symbols start with underscore" and "hide synbols start with two underscore"
|
||||||
- fix: can't rename project files that not openned in editor
|
- fix: can't rename project files that not openned in editor
|
||||||
- enhancement: group undo will stop at spaces
|
- enhancement: group undo will stop at spaces
|
||||||
|
- fix: menu font size is wrong when dpi changed
|
||||||
|
|
||||||
Red Panda C++ Version 0.14.4
|
Red Panda C++ Version 0.14.4
|
||||||
- enhancement: git - log
|
- enhancement: git - log
|
||||||
|
|
|
@ -239,6 +239,14 @@ void setTheme(const QString& theme) {
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
//QApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
|
//QApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
|
||||||
|
//#ifdef Q_OS_WIN
|
||||||
|
// QApplication::setAttribute(Qt::AA_DisableHighDpiScaling);
|
||||||
|
// QGuiApplication::setHighDpiScaleFactorRoundingPolicy(Qt::HighDpiScaleFactorRoundingPolicy::PassThrough);
|
||||||
|
// qputenv("QT_SCALE_FACTOR_ROUNDING_POLICY","PassThrough");
|
||||||
|
// qputenv("QT_DEVICE_PIXEL_RATIO ","auto");
|
||||||
|
// qputenv("QT_AUTO_SCREEN_SCALE_FACTOR","false");
|
||||||
|
//#endif
|
||||||
|
|
||||||
QApplication app(argc, argv);
|
QApplication app(argc, argv);
|
||||||
QFile tempFile(QDir::tempPath()+QDir::separator()+"RedPandaDevCppStartUp.lock");
|
QFile tempFile(QDir::tempPath()+QDir::separator()+"RedPandaDevCppStartUp.lock");
|
||||||
|
|
||||||
|
|
|
@ -752,7 +752,7 @@ void MainWindow::setActiveBreakpoint(QString FileName, int Line, bool setFocus)
|
||||||
|
|
||||||
void MainWindow::updateDPI(int oldDPI, int newDPI)
|
void MainWindow::updateDPI(int oldDPI, int newDPI)
|
||||||
{
|
{
|
||||||
applySettings();
|
//applySettings();
|
||||||
if (oldDPI<1)
|
if (oldDPI<1)
|
||||||
oldDPI = 1;
|
oldDPI = 1;
|
||||||
mBottomPanelHeight = mBottomPanelHeight * newDPI / oldDPI ;
|
mBottomPanelHeight = mBottomPanelHeight * newDPI / oldDPI ;
|
||||||
|
@ -4147,6 +4147,7 @@ void MainWindow::hideEvent(QHideEvent *)
|
||||||
bool MainWindow::event(QEvent *event)
|
bool MainWindow::event(QEvent *event)
|
||||||
{
|
{
|
||||||
if (event->type()==DPI_CHANGED_EVENT) {
|
if (event->type()==DPI_CHANGED_EVENT) {
|
||||||
|
applySettings();
|
||||||
int saveHeight = mBottomPanelHeight ;
|
int saveHeight = mBottomPanelHeight ;
|
||||||
int saveWidth = mLeftPanelWidth;
|
int saveWidth = mLeftPanelWidth;
|
||||||
openCloseBottomPanel(mBottomPanelOpenned);
|
openCloseBottomPanel(mBottomPanelOpenned);
|
||||||
|
|
Loading…
Reference in New Issue