浏览代码

Remove some more unnecessary scale things and fix default scale

It apears the web-client was still using the "system.scale" property,
which was hardcoded to return 0 with the recent scale code removal.
Change it to 1, which fixes HIDPI behavior here.

Passing the "initialScale" parameter to the web-client also seems to be
unnecessary now. web-client should stop parsing it, and should not read
"system.scale" anymore. For now, a stub is kept for "system.scale",
which always returns 1.
Vincent Lang 7 年之前
父节点
当前提交
824cf55ade
共有 3 个文件被更改,包括 3 次插入17 次删除
  1. 1 11
      src/system/SystemComponent.cpp
  2. 1 1
      src/system/SystemComponent.h
  3. 1 5
      src/ui/KonvergoWindow.cpp

+ 1 - 11
src/system/SystemComponent.cpp

@@ -41,7 +41,7 @@ QMap<SystemComponent::PlatformArch, QString> g_platformArchNames = {
 
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
-SystemComponent::SystemComponent(QObject* parent) : ComponentBase(parent), m_platformType(platformTypeUnknown), m_platformArch(platformArchUnknown), m_doLogMessages(false), m_cursorVisible(true), m_scale(0)
+SystemComponent::SystemComponent(QObject* parent) : ComponentBase(parent), m_platformType(platformTypeUnknown), m_platformArch(platformArchUnknown), m_doLogMessages(false), m_cursorVisible(true), m_scale(1)
 {
   m_mouseOutTimer = new QTimer(this);
   m_mouseOutTimer->setSingleShot(true);
@@ -360,13 +360,3 @@ QString SystemComponent::getCapabilitiesString()
 
   return capstring.arg(dtschannels).arg(ac3channels);
 }
-
-/////////////////////////////////////////////////////////////////////////////////////////
-void SystemComponent::updateScale(qreal scale)
-{
-  if (scale != m_scale)
-  {
-    m_scale = scale;
-    emit scaleChanged(m_scale);
-  }
-}

+ 1 - 1
src/system/SystemComponent.h

@@ -19,7 +19,7 @@ public:
   Q_PROPERTY(bool isMacos READ platformIsMac CONSTANT)
   Q_PROPERTY(bool isWindows READ platformIsWindows CONSTANT)
   Q_PROPERTY(bool isLinux READ platformIsLinux CONSTANT)
-  Q_PROPERTY(qreal scale MEMBER m_scale NOTIFY scaleChanged )
+  Q_PROPERTY(qreal scale MEMBER m_scale CONSTANT)
 
   bool componentExport() override { return true; }
   const char* componentName() override { return "system"; }

+ 1 - 5
src/ui/KonvergoWindow.cpp

@@ -708,11 +708,7 @@ QScreen* KonvergoWindow::loadLastScreen()
 /////////////////////////////////////////////////////////////////////////////////////////
 QString KonvergoWindow::webUrl()
 {
-  auto url = SettingsComponent::Get().getWebClientUrl(m_webDesktopMode);
-  if (m_webDesktopMode)
-    return url;
-
-  return url + QString("?initialScale=%0").arg(1);
+  return SettingsComponent::Get().getWebClientUrl(m_webDesktopMode);
 }
 
 /////////////////////////////////////////////////////////////////////////////////////////