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

Theme adwaita - icons and enhancements #68

Merged
merged 12 commits into from
Oct 16, 2023

Conversation

metal3d
Copy link
Contributor

@metal3d metal3d commented Jul 2, 2023

This PR proposes a better generator and to bundle icons.

  • The colors are written with better syntax (fully named properties for colors)
  • Icons are taken from the Adwaita icons repository (https://gitlab.gnome.org/GNOME/adwaita-icon-theme) and converted into fyne.Resource + "Themed" if there are "symbolic" (all icons are SVG)
  • Fallback to fyne icons when we don't have the corresponding icon
  • Place the license reference in the generated sources

These icons are, at this time, not converted from Adwaita (checked when resolved):

  • IconNameColorAchromatic no icon found
  • IconNameColorChromatic no icon found
  • IconNameColorPalette not relevent icon
  • IconNameFile not sure of the icon to use
  • IconNameLogin no icon found

Don't hesitate to tell me which icon is badly choosen or ideas for not set icons (above).

@metal3d metal3d marked this pull request as draft July 2, 2023 23:47
metal3d added 5 commits July 3, 2023 09:14
- prefer to use fully named properties in color struct
- prefer to use template to `printf` elements intead of doing it in the
  functions
oksvg has got some problems with gradients and with masked icon. Today,
use inkscape in command line to convert them to PNG.

Warning, inkscape says that it crashes with core dump even if the
convertion worked. This is a bug from inkscape. The PNG files are well
converted anyway.
@metal3d metal3d marked this pull request as ready for review July 3, 2023 09:19
metal3d added 2 commits July 3, 2023 14:25
- sizes of icon and text should respect the Adwaita sizes, so I need to
  set up:
  - padding to 8
  - inline icons to 16
  - text to 12
- fixed the scrollbar color to respect Adwaita colors (estimation made,
  there is no color set fot scrollbar in the documentation)
Actually, Adwaita doesn't document everything - at this time I need to
decide which is the closer color using the theme on GNOME and comparing
with a Fyne application.
@andydotxyz
Copy link
Member

This looks completely amazing update thanks.
Unfortunately I don't have a suitable system to test on I don't think (my Linux is FyneDesk and X utils).
Any others of the team on Linux and have a good Gnome setup?

@Jacalz
Copy link
Member

Jacalz commented Jul 12, 2023

I can check it out sometime next week. Gnome on Fedora is my main desktop environment :)

@Jacalz Jacalz self-requested a review July 12, 2023 20:15
metal3d added a commit to metal3d/scoreboard that referenced this pull request Aug 31, 2023
While fyne-io/fyne-x#68 is not merged, using my
own repository to have Adwaita theme + icons.
@andydotxyz
Copy link
Member

@Jacalz just bumping this as you were going to check it out. I don't have Gnome running (at least not well ;) ).

Copy link
Member

@Jacalz Jacalz 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 working on this. It is very cool. I just can't seem to get the icons working. All I did was to set the theme to the &Adwaita struct.

image

@metal3d
Copy link
Contributor Author

metal3d commented Oct 5, 2023

Thanks for working on this. It is very cool. I just can't seem to get the icons working. All I did was to set the theme to the &Adwaita struct.

image

Weird...

go mod edit -replace "fyne.io/x/fyne=github.com/metal3d/fyne-x@theme-adwaita"
go mod tidy

All the icons are set, whatever the project, even the one on FlatHub => https://flathub.org/fr/apps/org.metal3d.scoreboard

Are you sure to have taken the right branch?

@Jacalz
Copy link
Member

Jacalz commented Oct 5, 2023

Hmm. Maybe not. I'll have a look later today. Sorry

@Jacalz
Copy link
Member

Jacalz commented Oct 5, 2023

It is definitely working on my laptop now when doing a quick test. Will have to see later today if I did something wrong on my workstation.

image

It might require some some size changes for v2.4.0? It seems to me like the text is very small and the blue line below the tabs is very big. In general though it looks wonderful. Nice work :)

@metal3d
Copy link
Contributor Author

metal3d commented Oct 5, 2023

It might require some some size changes for v2.4.0? It seems to me like the text is very small and the blue line below the tabs is very big. In general though it looks wonderful. Nice work :)

Thanks a lot 😄

I probably leave a font scaling test by error. Sorry...

I will remove it if it's true.

@metal3d metal3d requested a review from Jacalz October 5, 2023 22:12
Copy link
Member

@Jacalz Jacalz left a comment

Choose a reason for hiding this comment

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

This looks great. Thank you :)
image

@Jacalz
Copy link
Member

Jacalz commented Oct 6, 2023

I see that there are checkboxes left in the description. Are you fine with me merging or do you want to wait? :) @metal3d

@andydotxyz
Copy link
Member

Let's just get this in - there will often be icons missing as we keep expending the main theme anyway.

@andydotxyz andydotxyz merged commit d8fd8fd into fyne-io:master Oct 16, 2023
7 checks passed
@metal3d
Copy link
Contributor Author

metal3d commented Oct 16, 2023

Thanks 😄

I'll keep an eye on newest icons, it takes the default in case of problems.

The generator takes the Adwaita git repository to generate the icons, and it's theoretically easy to add more icons in the theme.

@metal3d
Copy link
Contributor Author

metal3d commented Oct 16, 2023

I see that there are checkboxes left in the description. Are you fine with me merging or do you want to wait? :) @metal3d

Sorry for this, actually I kept default for the icons I'm not sure, or if the Adwaita icon is not exactly what we mean in Fyne.

Anyway, I could, later, enhance the icon set.

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.

3 participants