home
products
contribute
download
documentation
forum
Home
Forums
New posts
Search forums
What's new
New posts
All posts
Latest activity
Members
Registered members
Current visitors
Donate
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Search titles only
By:
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
MediaPortal 2
Skins and Design
BlueVision
Blue Vision
Contact us
RSS
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="ge2301" data-source="post: 1132748" data-attributes="member: 145639"><p>I could solve another issue, that annoyed me long time <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite8" alt=":D" title="Big Grin :D" loading="lazy" data-shortname=":D" /> So far depending on the aspect ratio and size differnt png-files are used as masks to create rounded corners for covers and fanarts.</p><p>This is necessary to avoid distorted corners.</p><p>Be creating a border as mask and applying it with a visualbrush on the grid's opacity, this can by done simply and aspect and size independent! <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite1" alt=":)" title="Smile :)" loading="lazy" data-shortname=":)" /> I'll update the complete code of BV accordingly.</p><p></p><p>Example of current code</p><p>[HTML]<ControlTemplate x:Key="GridViewMovieItemTemplate"></p><p> <Grid Margin="3,2,3,2"></p><p> <Grid Width="{StaticResource MEDIA_POSTER_WIDTH}" Height="{StaticResource MEDIA_POSTER_HEIGHT}" OpacityMask="{ThemeResource MediaItemsOpacityBrush}"></p><p> <Image HorizontalAlignment="Center" VerticalAlignment="Center" Stretch="Fill" FallbackSource="VideoLarge.png" ></p><p> <Image.Source></p><p> <fanart:FanArtImageSource fanart:FanArtMediaType="Movie" fanart:FanArtType="Poster" fanart:FanArtName="{Binding MediaItem.MediaItemId}"</p><p> fanart:MaxWidth="{StaticResource FANART_POSTER_WIDTH}" fanart:MaxHeight="{StaticResource FANART_POSTER_HEIGHT}"/></p><p> </Image.Source></p><p> </Image></p><p> <Image HorizontalAlignment="Left" VerticalAlignment="Top"></p><p> <Image.Source></p><p> <MultiBinding Converter="{StaticResource ExpressionMultiValueConverter}" ConverterParameter="{}{0} == 0 ? {1} : {2}"></p><p> <Binding Path="PlayCount"/></p><p> <Binding Source="UnwatchedTab_small.png"/></p><p> <Binding Source=""/></p><p> </MultiBinding></p><p> </Image.Source></p><p> </Image></p><p> </Grid></p><p> </Grid></p><p> </ControlTemplate>[/HTML]</p><p></p><p>Example of new code:</p><p>[HTML] <ControlTemplate x:Key="GridViewMovieItemTemplate"></p><p> <Border Name="mask" Background="White" CornerRadius="15" BorderThickness="0" BorderBrush="Black" /></p><p> <Grid Width="{StaticResource MEDIA_POSTER_WIDTH}" Height="{StaticResource MEDIA_POSTER_HEIGHT}" Margin="3,2,3,2" HorizontalAlignment="Center" VerticalAlignment="Center"></p><p> <Grid.OpacityMask></p><p> <VisualBrush Visual="{Binding ElementName=mask}"/></p><p> </Grid.OpacityMask></p><p> <Image HorizontalAlignment="Center" VerticalAlignment="Center" Stretch="Fill" FallbackSource="VideoLarge.png" ></p><p> <Image.Source></p><p> <fanart:FanArtImageSource fanart:FanArtMediaType="Movie" fanart:FanArtType="Poster" fanart:FanArtName="{Binding MediaItem.MediaItemId}"</p><p> fanart:MaxWidth="{StaticResource FANART_POSTER_WIDTH}" fanart:MaxHeight="{StaticResource FANART_POSTER_HEIGHT}"/></p><p> </Image.Source></p><p> </Image></p><p> <Image HorizontalAlignment="Left" VerticalAlignment="Top"></p><p> <Image.Source></p><p> <MultiBinding Converter="{StaticResource ExpressionMultiValueConverter}" ConverterParameter="{}{0} == 0 ? {1} : {2}"></p><p> <Binding Path="PlayCount"/></p><p> <Binding Source="UnwatchedTab_small.png"/></p><p> <Binding Source=""/></p><p> </MultiBinding></p><p> </Image.Source></p><p> </Image></p><p> </Grid></p><p> </ControlTemplate>[/HTML]</p></blockquote><p></p>
[QUOTE="ge2301, post: 1132748, member: 145639"] I could solve another issue, that annoyed me long time :D So far depending on the aspect ratio and size differnt png-files are used as masks to create rounded corners for covers and fanarts. This is necessary to avoid distorted corners. Be creating a border as mask and applying it with a visualbrush on the grid's opacity, this can by done simply and aspect and size independent! :) I'll update the complete code of BV accordingly. Example of current code [HTML]<ControlTemplate x:Key="GridViewMovieItemTemplate"> <Grid Margin="3,2,3,2"> <Grid Width="{StaticResource MEDIA_POSTER_WIDTH}" Height="{StaticResource MEDIA_POSTER_HEIGHT}" OpacityMask="{ThemeResource MediaItemsOpacityBrush}"> <Image HorizontalAlignment="Center" VerticalAlignment="Center" Stretch="Fill" FallbackSource="VideoLarge.png" > <Image.Source> <fanart:FanArtImageSource fanart:FanArtMediaType="Movie" fanart:FanArtType="Poster" fanart:FanArtName="{Binding MediaItem.MediaItemId}" fanart:MaxWidth="{StaticResource FANART_POSTER_WIDTH}" fanart:MaxHeight="{StaticResource FANART_POSTER_HEIGHT}"/> </Image.Source> </Image> <Image HorizontalAlignment="Left" VerticalAlignment="Top"> <Image.Source> <MultiBinding Converter="{StaticResource ExpressionMultiValueConverter}" ConverterParameter="{}{0} == 0 ? {1} : {2}"> <Binding Path="PlayCount"/> <Binding Source="UnwatchedTab_small.png"/> <Binding Source=""/> </MultiBinding> </Image.Source> </Image> </Grid> </Grid> </ControlTemplate>[/HTML] Example of new code: [HTML] <ControlTemplate x:Key="GridViewMovieItemTemplate"> <Border Name="mask" Background="White" CornerRadius="15" BorderThickness="0" BorderBrush="Black" /> <Grid Width="{StaticResource MEDIA_POSTER_WIDTH}" Height="{StaticResource MEDIA_POSTER_HEIGHT}" Margin="3,2,3,2" HorizontalAlignment="Center" VerticalAlignment="Center"> <Grid.OpacityMask> <VisualBrush Visual="{Binding ElementName=mask}"/> </Grid.OpacityMask> <Image HorizontalAlignment="Center" VerticalAlignment="Center" Stretch="Fill" FallbackSource="VideoLarge.png" > <Image.Source> <fanart:FanArtImageSource fanart:FanArtMediaType="Movie" fanart:FanArtType="Poster" fanart:FanArtName="{Binding MediaItem.MediaItemId}" fanart:MaxWidth="{StaticResource FANART_POSTER_WIDTH}" fanart:MaxHeight="{StaticResource FANART_POSTER_HEIGHT}"/> </Image.Source> </Image> <Image HorizontalAlignment="Left" VerticalAlignment="Top"> <Image.Source> <MultiBinding Converter="{StaticResource ExpressionMultiValueConverter}" ConverterParameter="{}{0} == 0 ? {1} : {2}"> <Binding Path="PlayCount"/> <Binding Source="UnwatchedTab_small.png"/> <Binding Source=""/> </MultiBinding> </Image.Source> </Image> </Grid> </ControlTemplate>[/HTML] [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 2
Skins and Design
BlueVision
Blue Vision
Contact us
RSS
Top
Bottom