public inbox for [email protected]  
help / color / mirror / Atom feed
From: Neel Patel <[email protected]>
To: Akshay Joshi <[email protected]>
Cc: Dave Page <[email protected]>
Cc: pgadmin-hackers <[email protected]>
Subject: Re: RM4292 - Dark mode support for Windows/macOS
Date: Wed, 22 Apr 2020 17:09:58 +0530
Message-ID: <CACCA4P2uc3JxMyPMJHTh=S-JQXCGWZi=Jiza2BtTNi=h9e+RTQ@mail.gmail.com> (raw)
In-Reply-To: <CANxoLDfvbYdS6UiCzUUdM4dyOiSqdNZV=ScM5dnse22O_hjPQw@mail.gmail.com>
References: <CA+OCxoyiLYcN0N00nFPT9YCOFo8HT47rcoidccq2N5fDJFuqtQ@mail.gmail.com>
	<CANxoLDdFpBpAg_V5r5M2ni9ycQzr-vhRkeQmMUfqEMYZXq-pZw@mail.gmail.com>
	<CACCA4P1U8iLJWDM4_by0+HC9oPyUrrfArsu522FgWC6+sjjzWA@mail.gmail.com>
	<CA+OCxowhYTCS0g7q=9BVi-Nd0=++3dWugAeZQTRzEVikwSdosA@mail.gmail.com>
	<CACCA4P0L-0PS_8-9i-sa4ECvH16kK6eJSgUcMHP57fTyzBHCBA@mail.gmail.com>
	<CA+OCxoyC1+id7C8ii5A+sfE8Kc+SQSNMrQ1FtGqn7hOaJG_MGg@mail.gmail.com>
	<CACCA4P1RUSK+7=nYB6gf9oKNOa=QoaDSdUBt06LMaw2VOdFyFA@mail.gmail.com>
	<CA+OCxox-df5Jx_68SJ=zbaXsWCZ9drH5WnTAiL0wdc0v3X_VgA@mail.gmail.com>
	<CACCA4P2VRQLbhzyrWFUHXTy+Jw-+dg3nMXkruFgLJ8zLxd2Gug@mail.gmail.com>
	<CANxoLDfvbYdS6UiCzUUdM4dyOiSqdNZV=ScM5dnse22O_hjPQw@mail.gmail.com>

Hi,

After debugging, I found that the required image formats Qt plugin was
missing in bundling and due to that "checkbox" images or all images were
not rendered from qss files. It was working fine in my local development
environment because all required plugins to load the images are present. I
have attached the patch for windows and Mac. Can you please review ? I will
verify once snapshot build is available.

Thanks,
Neel Patel

On Mon, Apr 20, 2020 at 7:19 PM Akshay Joshi <[email protected]>
wrote:

> Thanks, patch applied without testing it.
>
> On Mon, Apr 20, 2020 at 6:59 PM Neel Patel <[email protected]>
> wrote:
>
>> Hi,
>>
>> In windows, I am able to reproduce it with my dev environment and after
>> copying "Qt5Svg.dll", it renders the checkbox and for Mac build, we should
>> copy theme components in "Resources" folder which might solve the problem
>> and update the patch accordingly.
>> Once snapshot build is ready, I will verify with the same. Do review it.
>>
>> Thanks,
>> Neel Patel
>>
>> On Wed, Apr 15, 2020 at 7:12 PM Dave Page <[email protected]> wrote:
>>
>>>
>>>
>>> On Wed, Apr 15, 2020 at 2:11 PM Neel Patel <[email protected]>
>>> wrote:
>>>
>>>> Hi Dave,
>>>>
>>>> On Wed, Apr 15, 2020 at 5:04 PM Dave Page <[email protected]> wrote:
>>>>
>>>>> Hi
>>>>>
>>>>> On Thu, Apr 9, 2020 at 5:56 PM Neel Patel <[email protected]>
>>>>> wrote:
>>>>>
>>>>>>
>>>>>>
>>>>>>>>    - Checkbox is not visible in Configure window UI as per below
>>>>>>>>    screenshot. Are you able to see on Mac ? If no, I can take a look at it.
>>>>>>>>
>>>>>>>> [image: Screenshot 2020-04-09 at 5.05.25 PM.png]
>>>>>>>>
>>>>>>>
>>>>>>> No, that works on Mac. If you can look at it that would be great
>>>>>>> (are the SVGs from the patch in your filesystem?):
>>>>>>>
>>>>>>
>>>>>> Yes, all SVGs from the patch are there. I will take a look.
>>>>>>
>>>>>>
>>>>>>>
>>>>>>> [image: Screenshot 2020-04-09 at 17.47.39.png]
>>>>>>>
>>>>>>
>>>>> So interestingly, with the snapshot build I now see this:
>>>>>
>>>>> [image: Screenshot 2020-04-15 at 12.34.02.png]
>>>>>
>>>>> Any idea what's going on?
>>>>>
>>>>
>>>> All svg files and qss reside along with the application ?
>>>> Initially I got this issue and when I copied the qss and svg files
>>>> along with the application, it resolved the issue but again I will
>>>> double-check and update on this.
>>>>
>>>
>>> Actually, no - I don't see them in the appbundle.
>>>
>>> --
>>> Dave Page
>>> Blog: http://pgsnake.blogspot.com
>>> Twitter: @pgsnake
>>>
>>> EnterpriseDB UK: http://www.enterprisedb.com
>>> The Enterprise PostgreSQL Company
>>>
>>
>
> --
> *Thanks & Regards*
> *Akshay Joshi*
>
> *Sr. Software Architect*
> *EnterpriseDB Software India Private Limited*
> *Mobile: +91 976-788-8246*
>


Attachments:

  [image/png] Screenshot 2020-04-09 at 5.05.25 PM.png (74.0K, 3-Screenshot%202020-04-09%20at%205.05.25%20PM.png)
  download | view image

  [image/png] Screenshot 2020-04-09 at 17.47.39.png (398.3K, 4-Screenshot%202020-04-09%20at%2017.47.39.png)
  download | view image

  [image/png] Screenshot 2020-04-15 at 12.34.02.png (455.0K, 5-Screenshot%202020-04-15%20at%2012.34.02.png)
  download | view image

  [application/octet-stream] RM_5402_V2.patch (3.8K, 6-RM_5402_V2.patch)
  download | inline diff:
diff --git a/Make.bat b/Make.bat
index b42238a36..e95d4434b 100644
--- a/Make.bat
+++ b/Make.bat
@@ -265,12 +265,6 @@ REM Main build sequence Ends
     ECHO Staging pgAdmin4.exe...
     COPY "%WD%\runtime\release\pgAdmin4.exe" "%PGBUILDPATH%\runtime" > nul || EXIT /B 1
 
-    ECHO Staging dark and light theme components...
-    COPY "%WD%\runtime\dark.qss" "%PGBUILDPATH%\runtime" > nul || EXIT /B 1
-    COPY "%WD%\runtime\light.qss" "%PGBUILDPATH%\runtime" > nul || EXIT /B 1
-    XCOPY /S /I /E /H /Y "%WD%\runtime\dark" "%PGBUILDPATH%\runtime\dark" > nul || EXIT /B 1
-    XCOPY /S /I /E /H /Y "%WD%\runtime\light" "%PGBUILDPATH%\runtime\light" > nul || EXIT /B 1
-
     ECHO Staging Qt components...
     COPY "%QTDIR%\bin\Qt5Core.dll"   "%PGBUILDPATH%\runtime" > nul || EXIT /B 1
     COPY "%QTDIR%\bin\Qt5Gui.dll"    "%PGBUILDPATH%\runtime" > nul || EXIT /B 1
@@ -282,6 +276,8 @@ REM Main build sequence Ends
     IF EXIST "%QTDIR%\bin\libwinpthread-1.dll" COPY "%QTDIR%\bin\libwinpthread-1.dll" "%PGBUILDPATH%\runtime" > nul || EXIT /B 1
     MKDIR "%PGBUILDPATH%\runtime\platforms" > nul || EXIT /B 1
     COPY "%QTDIR%\plugins\platforms\qwindows.dll" "%PGBUILDPATH%\runtime\platforms" > nul || EXIT /B 1
+    MKDIR "%PGBUILDPATH%\runtime\imageformats" > nul || EXIT /B 1
+    COPY "%QTDIR%\plugins\imageformats\qsvg.dll" "%PGBUILDPATH%\runtime\imageformats" > nul || EXIT /B 1
     ECHO [Paths] > "%PGBUILDPATH%\runtime\qt.conf"
     ECHO Plugins=plugins >> "%PGBUILDPATH%\runtime\qt.conf"
 
diff --git a/pkg/mac/build.sh b/pkg/mac/build.sh
index 8308a82d1..c8b443b70 100755
--- a/pkg/mac/build.sh
+++ b/pkg/mac/build.sh
@@ -153,7 +153,6 @@ _build_runtime() {
     ${QMAKE} || { echo qmake failed; exit 1; }
     make || { echo make failed; exit 1; }
     cp -r pgAdmin4.app "${BUILDROOT}/${APP_BUNDLE_NAME}"
-    cp -r dark light dark.qss light.qss "${BUILDROOT}/${APP_BUNDLE_NAME}/Contents/Resources/"
 }
 
 _build_doc() {
diff --git a/pkg/mac/complete-bundle.sh b/pkg/mac/complete-bundle.sh
index 985bbc802..1cc6b8e31 100755
--- a/pkg/mac/complete-bundle.sh
+++ b/pkg/mac/complete-bundle.sh
@@ -23,7 +23,9 @@ EOF
 
 test -d "${bundle}/Contents/Frameworks" || mkdir -p "${bundle}/Contents/Frameworks" || exit 1
 test -d "${bundle}/Contents/PlugIns/platforms" || mkdir -p "${bundle}/Contents/PlugIns/platforms" || exit 1
+test -d "${bundle}/Contents/PlugIns/imageformats" || mkdir -p "${bundle}/Contents/PlugIns/imageformats" || exit 1
 cp -f ${QTDIR}/plugins/platforms/libqcocoa.dylib "${bundle}/Contents/PlugIns/platforms" || { echo libqcocoa.dylib not found in ${QTDIR}/plugins/platforms; exit 1; }
+cp -f ${QTDIR}/plugins/imageformats/libqsvg.dylib "${bundle}/Contents/PlugIns/imageformats" || { echo libqsvg.dylib not found in ${QTDIR}/plugins/imageformats; exit 1; }
 cp -f ${PGDIR}/lib/libpq.5.dylib "${bundle}/Contents/Frameworks" || { echo libpq.5.dylib not found in ${PGDIR}; exit 1; }
 
 function CompleteSingleApp() {
@@ -59,6 +61,8 @@ function CompleteSingleApp() {
 			); do
 				if echo ${lib} | grep "PlugIns\|libqcocoa"  > /dev/null; then
 					lib_loc="Contents/PlugIns/platforms"
+				elif echo ${lib} | grep "PlugIns\|libqsvg"  > /dev/null; then
+					lib_loc="Contents/PlugIns/imageformats"
 				elif echo ${lib} | grep "Qt" > /dev/null; then
 					qtfw_path="$(dirname ${lib} | sed 's|.*\(Qt.*framework\)|\1|')"
 					lib_loc="Contents/Frameworks/${qtfw_path}"
diff --git a/pkg/win32/installer.iss.in b/pkg/win32/installer.iss.in
index 560f00601..7deb925f3 100644
--- a/pkg/win32/installer.iss.in
+++ b/pkg/win32/installer.iss.in
@@ -294,8 +294,6 @@ begin
       begin
         DelWebfolder(ExpandConstant('{app}\web'));
         DelFolder(ExpandConstant('{app}\venv'));
-        DelFolder(ExpandConstant('{app}\runtime\dark'));
-        DelFolder(ExpandConstant('{app}\runtime\light'));
       end;
 	end;
   end;


view thread (26+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected], [email protected]
  Subject: Re: RM4292 - Dark mode support for Windows/macOS
  In-Reply-To: <CACCA4P2uc3JxMyPMJHTh=S-JQXCGWZi=Jiza2BtTNi=h9e+RTQ@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox