Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

qt: add qt.style option #1839

Merged
merged 1 commit into from
Mar 4, 2021

Conversation

thiagokokada
Copy link
Contributor

@thiagokokada thiagokokada commented Feb 28, 2021

Description

This allows you to set a theme for Qt applications. For example, if you want to use adwaita-qt theme to have uniform look between Gtk and Qt applications, you can use it like this:

{
  qt = {
    enable = true;
    platformTheme = "gnome";
    style = {
      name = "adwaita";
      package = pkgs.adwaita-qt;
    };
  };
}

Checklist

  • Change is backwards compatible.

  • Code formatted with ./format.

  • Code tested through nix-shell --pure tests -A run.all.

  • Test cases updated/added. See example.

  • Commit messages are formatted like

    {component}: {description}
    
    {long description}
    

    See CONTRIBUTING for more information and recent commit messages for examples.

  • If this PR adds a new module

    • Added myself as module maintainer. See example.

    • Added myself and the module files to .github/CODEOWNERS.

@thiagokokada thiagokokada requested a review from rycee as a code owner February 28, 2021 19:59
@thiagokokada thiagokokada changed the title Add qt style override qt: add qt.style option Feb 28, 2021
@thiagokokada
Copy link
Contributor Author

thiagokokada commented Feb 28, 2021

Before (not possible to change to dark theme):

2021-02-28_16-52-27-screenshot

After (using qt.style.name = "adwaita-dark" and qt.style.package = pkgs.adwaita-qt):
2021-02-28_16-54-39-screenshot

Copy link
Member

@berbiche berbiche left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution.
There's an empty file in the qt tests.

Otherwise, everything is good 👍

modules/misc/qt.nix Outdated Show resolved Hide resolved
modules/misc/qt.nix Outdated Show resolved Hide resolved
doc/release-notes/rl-2105.adoc Outdated Show resolved Hide resolved
@thiagokokada thiagokokada force-pushed the add-qt-style-override branch 2 times, most recently from 907eeec to 56d9a5d Compare March 1, 2021 23:04
modules/misc/qt.nix Outdated Show resolved Hide resolved
@thiagokokada thiagokokada force-pushed the add-qt-style-override branch from 56d9a5d to 41caa18 Compare March 2, 2021 23:06
@thiagokokada thiagokokada requested a review from berbiche March 2, 2021 23:06
This allows you to set a theme for Qt applications. For example, if you
want to use `adwaita-qt` theme to have uniform look between Gtk and Qt
applications, you can use it like this:

```nix
{
  qt = {
    enable = true;
    platformTheme = "gnome";
    style = {
      name = "adwaita";
      package = pkgs.adwaita-qt;
    };
  };
}
```
@thiagokokada thiagokokada force-pushed the add-qt-style-override branch from 41caa18 to bc9f7f1 Compare March 4, 2021 03:07
@berbiche berbiche merged commit 0e2dc4b into nix-community:master Mar 4, 2021
@berbiche
Copy link
Member

berbiche commented Mar 4, 2021

Thanks again!

@thiagokokada thiagokokada deleted the add-qt-style-override branch March 4, 2021 13:39
cab404 pushed a commit to cab404/home-manager that referenced this pull request Apr 23, 2021
This allows you to set a theme for Qt applications. For example, if you
want to use `adwaita-qt` theme to have uniform look between Gtk and Qt
applications, you can use it like this:

```nix
{
  qt = {
    enable = true;
    platformTheme = "gnome";
    style = {
      name = "adwaita";
      package = pkgs.adwaita-qt;
    };
  };
}
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants