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

Window transparency on MacOS in version 0.10.15 #8419

Closed
GLEB-M opened this issue Jun 30, 2022 · 0 comments · Fixed by #10196
Closed

Window transparency on MacOS in version 0.10.15 #8419

GLEB-M opened this issue Jun 30, 2022 · 0 comments · Fixed by #10196

Comments

@GLEB-M
Copy link

GLEB-M commented Jun 30, 2022

Describe the bug
No transparency on tooltip corners and windows with custom template in version 0.10.15

To Reproduce

<Window xmlns="https://github.com/avaloniaui"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        mc:Ignorable="d" Width="200" Height="100"
        x:Class="AvaloniaApplication1.MainWindow"
        SystemDecorations="None"
        WindowStartupLocation="CenterScreen"
        Title="AvaloniaApplication1" Name="Wnd">
    <Window.Template>
      <ControlTemplate TargetType="Window">
        <Border Name="newBorder" CornerRadius="50" Background="Green" >
          <ContentPresenter Name="ContentPresenter" Margin="{TemplateBinding Padding}" Content="{TemplateBinding Content}"  ContentTemplate="{TemplateBinding ContentTemplate}" />
        </Border>
      </ControlTemplate> 
    </Window.Template>

    <StackPanel Orientation="Vertical">
      <TextBlock HorizontalAlignment="Center" Foreground="White" Margin="10">Заголовок</TextBlock>
      <Button HorizontalAlignment="Center" Click="OnButtonClick" Margin="10" Content="123" >
          <ToolTip.Tip>
            <StackPanel>
              <TextBlock Classes="h1">ToolTip</TextBlock>
              <TextBlock Classes="h2">A control which pops up a hint when a control is hovered</TextBlock>
            </StackPanel>
          </ToolTip.Tip>
      </Button>
    </StackPanel>
</Window>

Expected behavior
Must be transparent

Screenshots
macos

Desktop (please complete the following information):

  • OS: MacOS Catalina 10.15
  • Avalonia Version 0.10.15

Additional context
This problem in version 0.10.15. Version 0.10.14 is ok.
Also if take libAvaloniaNative.dylib from version 0.10.14 and put it to binary version 0.10.15, then everything works.

@GLEB-M GLEB-M added the bug label Jun 30, 2022
grokys added a commit that referenced this issue Feb 3, 2023
The macOS backend sets up a window with a transparency level of `None` but the managed code thinks it's `Transparent`, meaning that making the window transparent did nothing as it thinks it's already set.

Fixes #8419
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants