Re: RM4292 - Dark mode support for Windows/macOS

From: Akshay Joshi <akshay(dot)joshi(at)enterprisedb(dot)com>
To: Neel Patel <neel(dot)patel(at)enterprisedb(dot)com>
Cc: Dave Page <dpage(at)pgadmin(dot)org>, pgadmin-hackers <pgadmin-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: RM4292 - Dark mode support for Windows/macOS
Date: 2020-04-13 08:35:59
Message-ID: CANxoLDdqEgjbmzdqvd=rMygNHqdG4Ey3J1sPh5Zx+JKtixB6MQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers

Thanks, patch applied.

On Fri, Apr 10, 2020 at 5:41 PM Neel Patel <neel(dot)patel(at)enterprisedb(dot)com>
wrote:

> Hi Dave/Akshay,
>
> I had manually added the theme parameter in registry but after changing
> those from the control panel as suggested by Dave, all control looks fine
> in dark theme.
> Please find the attached patch for review.
>
> Thanks,
> Neel Patel
>
> On Thu, Apr 9, 2020 at 10:26 PM Neel Patel <neel(dot)patel(at)enterprisedb(dot)com>
> wrote:
>
>> Hi Dave,
>>
>> On Thu, Apr 9, 2020 at 10:19 PM Dave Page <dpage(at)pgadmin(dot)org> wrote:
>>
>>> Hi
>>>
>>> On Thu, Apr 9, 2020 at 2:28 PM Neel Patel <neel(dot)patel(at)enterprisedb(dot)com>
>>> wrote:
>>>
>>>> Hi Dave,
>>>>
>>>> I reviewed and tested the code on Windows and fixed below issues.
>>>> Except below, it looks good to me.
>>>>
>>>> - Compilation error on windows
>>>>
>>>> Oops, thanks.
>>>
>>>>
>>>> - In configuration window, "maximumSize" of the control is provided
>>>> along with "minimumSize" so it prevents control from expanding when the
>>>> user resizes the window. Removed maxSize and set as default.
>>>>
>>>> OK.
>>>
>>>
>>>> A Couple of points for discussion.
>>>>
>>>> - AFAIK - Users need to manually set the "AppsUseLightTheme" value
>>>> in the registry, right ? Do we need to document that somewhere ?
>>>>
>>>> No, it's an option if you go to personalise your desktop:
>>>
>>
>> OK
>>
>>
>>>
>>> [image: Screenshot 2020-04-09 at 17.45.02.png]
>>>
>>>
>>>>
>>>> - As we have introduced 2 new "dark.qss" & "light.qss" files, so
>>>> during packaging we need to make sure that it should reside along with
>>>> "pgAdmin4" application binary otherwise those css will not be applied at
>>>> runtime. right ?
>>>>
>>>> Hmm, that's a good point. I'll look at that.
>>>
>>>>
>>>> - 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]
>>> Thanks!
>>>
>>>
>>>>
>>>> Attached is the updated patch.
>>>>
>>>> Thanks,
>>>> Neel Patel
>>>>
>>>> On Thu, Apr 9, 2020 at 11:12 AM Akshay Joshi <
>>>> akshay(dot)joshi(at)enterprisedb(dot)com> wrote:
>>>>
>>>>> Neel,
>>>>>
>>>>> Can you please review/test it?
>>>>>
>>>>> On Wed, Apr 8, 2020 at 9:08 PM Dave Page <dpage(at)pgadmin(dot)org> wrote:
>>>>>
>>>>>> The attached patch detects if dark mode is enabled on Windows
>>>>>> (10+)/macOS (10.14+) at server start, and styles the runtime accordingly.
>>>>>> It doesn't dynamically switch if the user changes their preferences.
>>>>>>
>>>>>> Linux builds continue to use the standard styling from Qt.
>>>>>>
>>>>>> NOTE: I've tested this on macOS, but my Windows build system is
>>>>>> playing up at the moment. Akshay, can you have someone on your team test it
>>>>>> please? I believe the code should work; it's just a case of reading a reg
>>>>>> key and then doing the same thing as on macOS to set the theme accordingly.
>>>>>>
>>>>>> --
>>>>>> 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*
>>>>>
>>>>
>>>
>>> --
>>> 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*

In response to

Responses

Browse pgadmin-hackers by date

  From Date Subject
Next Message Akshay Joshi 2020-04-13 08:58:46 Re: [pgAdmin4][RM#4858] Allow user to reconnect to DB server when connection is drop
Previous Message Akshay Joshi 2020-04-13 08:35:45 Re: [pgAdmin4][Runtime][Patch]: RM-4864 - Window too small for text in configuration