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

Visual bugs within GTK/GNOME #33

Open
krissh-wtf opened this issue May 11, 2024 · 4 comments
Open

Visual bugs within GTK/GNOME #33

krissh-wtf opened this issue May 11, 2024 · 4 comments

Comments

@krissh-wtf
Copy link

krissh-wtf commented May 11, 2024

I recently switched to Gnome on Wayland and have noticed that titles and icons don't actually work and the bookmarks toolbar is enabled by default. screenshot
Also seems that windows fade weirdly but that might be a firefox issue.
screenshot

Here is the code i used:

proc window*() =
    let
        window = newWindow()
        icon = "data:image/png;base64,..."
        iconType = "image/png"
    
    window.rootFolder=currentSourcePath().parentDir().parentDir() / "ui"
    window.setIcon(icon, iconType)
    window.show(renderIndex())

    wait()
@krissh-wtf
Copy link
Author

krissh-wtf commented May 11, 2024

i would also like to note that i tried compiling the text editor example to see if it was a problem on my end but i realized it wasn't even written to use the icon

@krissh-wtf
Copy link
Author

and if you're wondering renderIndex() is karax:


proc renderIndex*(): string =
  let vnode = buildHtml(tdiv):
    html(lang = "en"):
      head:
        meta(charset = "UTF-8")
        meta(content = "width=device-width, initial-scale=1.0", name="viewport")
        meta(content = "default-src 'self'", http-equiv = "Content-Security-Policy")
        title:
          text readSettings("appearance", "title")
        script(src="webui.js")
        link(rel="stylesheet", href="ui/themes/normalize.min.css")
        link(rel="stylesheet", href="ui/themes/default.css")
      body:
        header:
          hgroup:
            h1:
              bold:
                text readSettings("appearance", "title")
            p:
              text readSettings("appearance", "welcome_text")
        footer:
          p:
            text "made with love in france"
  
  result = $vnode

but i have tried it with raw html but it doesn't change anything

@krissh-wtf
Copy link
Author

I just noticed but the menubar seems to be over the window decoration?
image

so this may all just be a firefox issue, currently using 125.0.3 but i have tried it on LTS edition which is on 115 but it's still the same issue

@AlbertShown
Copy link

This issue exist only in Firefox, if you change the browser it will look fine window.show(renderIndex(), Browsers.Chrome).

If you want to try to fix this issue in Firefox, you can tweak the UI by modifying this file in Linux:
/tmp/.WebUI/WebUIFirefoxProfile/chrome/userChrome.css.

If you managed to make UI look better, please submit the userChrome.css CSS code so someone add it to webui code.

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

No branches or pull requests

2 participants