PolyMeilex / sctk-adwaita

Adwaita-like SCTK Frame
MIT License
26 stars 19 forks source link

Change shadows to match my machine #57

Closed planetoryd closed 8 months ago

Friz64 commented 8 months ago

Was this pull request opened in good faith?

planetoryd commented 8 months ago

Yes, I will use this branch in my app. It's a pull request not a merge request

https://github.com/PolyMeilex/sctk-adwaita/blob/34229df3affe84d3e1dc5c6d91b706fcb5fe6892/showcase.png

Friz64 commented 8 months ago

By opening this, you made a request to the maintainers to pull your code into this repository, which is just another way of saying merging.

You do not need to open a pull request in order to have your own branch. In fact, you already do! It's planetoryd:master, which is the source branch of this pull request. Just point your Cargo to that branch and you'll be all set.

If you do not want your code to be merged upstream, don't open a pull request.

Friz64 commented 8 months ago

Beyond that, I believe I chose the current values with good reason. The values should result in shadows that look practically indistinguishable from those of a GTK/libadwaita window, which this library aims to replicate. I don't see a reason why different computers would have different values for this. Which window did you use as a reference?

planetoryd commented 8 months ago

You do not need to open a pull request in order to have your own branch.

Yeah I know.

I‘ll make it clear. The point is, is there anything you can do to avoid me having a separate branch of everything (like adding more parameters). I showed the effect I want and the code. The original shadow is terribly ugly (in the context of my machine) and I don't want it in my app. If you are doing it, or planning to do it, great.

Which window did you use as a reference?

Windows on gnome (stock arch gnome). I'm not sure what decides the look of shadows but it's just on my gnome.

I would 100% change the shadow this way. Any out-of-place look is a no.

Or, it should at least be good-looking. The large shadows just feel weird on my machine.

https://github.com/planetoryd/egui_node_graph

https://github.com/planetoryd/egui_node_graph/raw/main/show.png

planetoryd commented 8 months ago

practically indistinguishable from those of a GTK/libadwaita window, which this library aims to replicate.

Perhaps we should have a separate library and add adjustable parameters to dependents instead. Holistically speaking it should be made easier to have this kind of nice natural looking shadows (match any user system installation), ie without forking a lot.

Friz64 commented 8 months ago

image

I see you used VSCode as a reference. Because VSCode is using X11, the window decorations are drawn by GNOME. Unfortunately, these decorations, especially their shadow, do not resemble modern GTK/libadwaita applications in any way. GNOME apparently has no interest in keeping these decorations up to date. Open any modern app, such as Files or Settings, and you will see that their shadow is just as large as the one from default sctk-adwaita.

planetoryd commented 8 months ago

Ah, that's true. I didn't notice.

Friz64 commented 8 months ago

Windows on gnome (stock arch gnome). I'm not sure what decides the look of shadows but it's just on my gnome.

My GNOME is the exact same. Saying "Windows on gnome" does not make any sense as the shadows very much depend on the kind of window you're looking at. If the window is using X11 it will have outdated window decorations. If it is using Wayland it will have the window decorations drawn by its GUI framework / windowing library.

Friz64 commented 8 months ago

@planetoryd Oh btw, you might want to have a look at https://github.com/zakarumych/egui-snarl.