Переглянути джерело

Merge branch 'master' into release

Ian Walton 4 роки тому
батько
коміт
86954f5f52
4 змінених файлів з 19 додано та 6 видалено
  1. 1 1
      README.md
  2. 2 1
      debian/control
  3. 3 1
      native/nativeshell.js
  4. 13 3
      src/ui/KonvergoWindow.cpp

+ 1 - 1
README.md

@@ -11,7 +11,7 @@ This build strips a lot of un-needed things from the player.
 ## Building at a glance (Linux)
 
 ```bash
-sudo apt install autoconf automake libtool libharfbuzz-dev libfreetype6-dev libfontconfig1-dev libx11-dev libxrandr-dev libvdpau-dev libva-dev mesa-common-dev libegl1-mesa-dev yasm libasound2-dev libpulse-dev libuchardet-dev zlib1g-dev libfribidi-dev git libgnutls28-dev libgl1-mesa-dev libsdl2-dev cmake wget python g++ qtwebengine5-dev qtquickcontrols2-5-dev libqt5x11extras5-dev libcec-dev qml-module-qtwebengine qml-module-qtwebchannel
+sudo apt install autoconf automake libtool libharfbuzz-dev libfreetype6-dev libfontconfig1-dev libx11-dev libxrandr-dev libvdpau-dev libva-dev mesa-common-dev libegl1-mesa-dev yasm libasound2-dev libpulse-dev libuchardet-dev zlib1g-dev libfribidi-dev git libgnutls28-dev libgl1-mesa-dev libsdl2-dev cmake wget python g++ qtwebengine5-dev qtquickcontrols2-5-dev libqt5x11extras5-dev libcec-dev qml-module-qtwebengine qml-module-qtwebchannel qtbase5-private-dev
 mkdir jmp; cd jmp
 git clone https://github.com/mpv-player/mpv-build.git
 cd mpv-build

+ 2 - 1
debian/control

@@ -35,7 +35,8 @@ Build-Depends: debhelper (>= 9),
                libcec-dev,
                libmpv-dev,
                wget,
-               unzip
+               unzip,
+               qtbase5-private-dev
 Standards-Version: 3.9.4
 Homepage: https://jellyfin.org/
 Vcs-Git: https://github.org/jellyfin/jellyfin-media-player.git

+ 3 - 1
native/nativeshell.js

@@ -162,12 +162,14 @@ async function showSettingsModal() {
     modalContainer.appendChild(modalContainer2);
 
     const modal = document.createElement("div");
+    modal.className = "jmp-settings-modal";
     Object.assign(modal.style, {
         width: "100%",
         padding: "20px",
         boxSizing: "border-box",
         backgroundColor: "#202020",
-        height: "min-content"
+        height: "min-content",
+        color: "#fff"
     });
     modalContainer2.appendChild(modal);
 

+ 13 - 3
src/ui/KonvergoWindow.cpp

@@ -178,9 +178,17 @@ void KonvergoWindow::saveGeometry()
 
   QLOG_DEBUG() << "Saving window geometry:" << rc;
 
-  QVariantMap map = {{"x", rc.x()}, {"y", rc.y()},
-                     {"width", rc.width()}, {"height", rc.height()}};
-  SettingsComponent::Get().setValue(SETTINGS_SECTION_STATE, "geometry", map);
+  if (visibility() == QWindow::Maximized)
+  {
+    SettingsComponent::Get().setValue(SETTINGS_SECTION_STATE, "maximized", true);
+  }
+  else if (visibility() != QWindow::Hidden)
+  {
+    QVariantMap map = {{"x", rc.x()}, {"y", rc.y()},
+                       {"width", rc.width()}, {"height", rc.height()}};
+    SettingsComponent::Get().setValue(SETTINGS_SECTION_STATE, "geometry", map);
+    SettingsComponent::Get().setValue(SETTINGS_SECTION_STATE, "maximized", false);
+  }
   QScreen *curScreen = screen();
   SettingsComponent::Get().setValue(SETTINGS_SECTION_STATE, "lastUsedScreen", curScreen ? curScreen->name() : "");
 }
@@ -218,6 +226,8 @@ QRect KonvergoWindow::loadGeometry()
   else
   {
     setGeometry(nsize);
+    if (SettingsComponent::Get().value(SETTINGS_SECTION_STATE, "maximized").toBool())
+      setVisibility(QWindow::Maximized);
     saveGeometry();
   }