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

Inset Border around Window. #212

Open
reinitd opened this issue Sep 19, 2024 · 1 comment
Open

Inset Border around Window. #212

reinitd opened this issue Sep 19, 2024 · 1 comment

Comments

@reinitd
Copy link

reinitd commented Sep 19, 2024

Hello, when I run my Photino app there is a border present.
This was first mentioned in a now closed issue, issue 115.

The issue was closed with "We're not sure why it was set to have a border in the first place. We've removed it for the next release."
However, there is a border still present.

image

Below is also the code I've used, it's near identical to the template:

using System;
using System.Drawing;
using System.IO;
using System.Text;
using PhotinoNET;

namespace RenchGui;

class Program
{
    [STAThread]
    static void Main(string[] args)
    {
        string windowTitle = "RenchGui";

        var window = new PhotinoWindow()
            .SetTitle(windowTitle)
            .SetUseOsDefaultSize(false)
            .SetSize(new Size(300, 300))
            .SetChromeless(true)
            .Center()
            .SetResizable(false)
            .SetContextMenuEnabled(false)
            // Most event handlers can be registered after the
            // PhotinoWindow was instantiated by calling a registration
            // method like the following RegisterWebMessageReceivedHandler.
            // This could be added in the PhotinoWindowOptions if preferred.
            .RegisterWebMessageReceivedHandler(
                (object sender, string message) =>
                {
                    var window = (PhotinoWindow)sender;

                    // The message argument is coming in from sendMessage.
                    // "window.external.sendMessage(message: string)"
                    string response = $"Received message: \"{message}\"";

                    // Send a message back the to JavaScript event handler.
                    // "window.external.receiveMessage(callback: Function)"
                    window.SendWebMessage(response);
                }
            )
            .Load("wwwroot/index.html");

        window.WaitForClose();
    }
}

Here is the output from Photino:

Photino.NET: "Photino".SetTitle(RenchGui)
Photino.NET: "RenchGui".SetUseOsDefaultSize(False)
Photino.NET: "RenchGui".SetSize({Width=300, Height=300})
Photino.NET: "RenchGui".SetChromeless(True)
Photino.NET: "RenchGui".Center()
Photino.NET: "RenchGui".SetResizable(False)
Photino.NET: "RenchGui".SetContextMenuEnabled(False)
Photino.NET: "RenchGui".Load(wwwroot/index.html)
Photino.NET: "RenchGui".Load(file:///C:/Users/User/dev/cs/Rench/RenchGui/wwwroot/index.html)

If you need any more information please let me know,.

@philippjbauer
Copy link
Member

@reinitd We can't replicate the issue on Windows 11. Kindly let us know which OS you're using and what theme options you have 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

No branches or pull requests

2 participants