Skip to content

Commit c1004aa

Browse files
committed
Fix transition in topics
1 parent 38ee617 commit c1004aa

File tree

2 files changed

+47
-43
lines changed

2 files changed

+47
-43
lines changed

Telegram/Views/ChatView.xaml

Lines changed: 45 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1214,49 +1214,53 @@
12141214
</Button.RenderTransform>
12151215
</controls:BackButton>
12161216

1217-
<controls:ActiveStoriesSegments x:Name="Segments"
1218-
Click="Segments_Click"
1219-
Width="36"
1220-
Height="36"
1221-
HorizontalAlignment="Center"
1222-
AutomationProperties.Name="{CustomResource AccDescrProfilePicture}"
1223-
Grid.Column="1">
1224-
<controls:ProfilePicture x:Name="Photo"
1225-
Size="36" />
1226-
</controls:ActiveStoriesSegments>
1227-
1228-
<controls:CustomEmojiIcon x:Name="Icon"
1229-
AutomationProperties.Name="{CustomResource AccDescrProfilePicture}"
1230-
Width="32"
1231-
Height="32"
1232-
FrameSize="32,32"
1233-
DecodeFrameType="Logical"
1234-
HorizontalAlignment="Center"
1235-
Grid.Column="1" />
1236-
1237-
<Grid x:Name="TopicIconRoot"
1238-
HorizontalAlignment="Right"
1239-
VerticalAlignment="Center"
1217+
<Grid x:Name="PhotoRoot"
1218+
Width="36"
1219+
Height="36"
12401220
Grid.Column="1">
1241-
<Path x:Name="TopicIconPath"
1242-
Data="M2.00008 16C2.00008 8.26801 8.2681 2 16.0001 2C23.7321 2 30.0001 8.26801 30.0001 16C30.0001 23.732 23.7321 30 16.0001 30C13.6316 30 11.398 29.4111 9.44042 28.3711L3.91211 29.9432C2.78178 30.2646 1.73759 29.2204 2.05902 28.0901L3.63078 22.563C2.58969 20.6046 2.00008 18.3698 2.00008 16Z" />
1243-
<TextBlock x:Name="TopicIconText"
1244-
TextAlignment="Center"
1245-
Foreground="#FFFFFF"
1246-
FontSize="16"
1247-
FontWeight="SemiBold"
1248-
HorizontalAlignment="Left"
1249-
Margin="0,4,0,0"
1250-
Width="32" />
1251-
</Grid>
1221+
<controls:ActiveStoriesSegments x:Name="Segments"
1222+
Click="Segments_Click"
1223+
Width="36"
1224+
Height="36"
1225+
HorizontalAlignment="Center"
1226+
AutomationProperties.Name="{CustomResource AccDescrProfilePicture}">
1227+
<controls:ProfilePicture x:Name="Photo"
1228+
Size="36" />
1229+
</controls:ActiveStoriesSegments>
12521230

1253-
<Path x:Name="TopicIconGeneral"
1254-
Fill="{ThemeResource SystemControlForegroundBaseMediumBrush}"
1255-
HorizontalAlignment="Center"
1256-
VerticalAlignment="Center"
1257-
Data="M12.9797 3.20059C13.0904 2.65951 12.7415 2.13116 12.2004 2.02048C11.6593 1.90981 11.131 2.25872 11.0203 2.7998L9.75202 9.0002H4C3.44772 9.0002 3 9.44791 3 10.0002C3 10.5525 3.44772 11.0002 4 11.0002H9.34293L8.11566 17.0002H3C2.44772 17.0002 2 17.4479 2 18.0002C2 18.5525 2.44772 19.0002 3 19.0002H7.70657L6.52029 24.7998C6.40961 25.3409 6.75852 25.8692 7.2996 25.9799C7.84069 26.0906 8.36904 25.7417 8.47971 25.2006L9.74798 19.0002H15.7066L14.5203 24.7998C14.4096 25.3409 14.7585 25.8692 15.2996 25.9799C15.8407 26.0906 16.369 25.7417 16.4797 25.2006L17.748 19.0002H23C23.5523 19.0002 24 18.5525 24 18.0002C24 17.4479 23.5523 17.0002 23 17.0002H18.1571L19.3843 11.0002H24C24.5523 11.0002 25 10.5525 25 10.0002C25 9.44791 24.5523 9.0002 24 9.0002H19.7934L20.9797 3.20059C21.0904 2.65951 20.7415 2.13116 20.2004 2.02048C19.6593 1.90981 19.131 2.25872 19.0203 2.7998L17.752 9.0002H11.7934L12.9797 3.20059ZM16.1157 17.0002H10.1571L11.3843 11.0002H17.3429L16.1157 17.0002Z"
1258-
Visibility="Collapsed"
1259-
Grid.Column="1" />
1231+
<controls:CustomEmojiIcon x:Name="Icon"
1232+
IsHitTestVisible="False"
1233+
AutomationProperties.Name="{CustomResource AccDescrProfilePicture}"
1234+
Width="32"
1235+
Height="32"
1236+
FrameSize="32,32"
1237+
DecodeFrameType="Logical"
1238+
HorizontalAlignment="Center" />
1239+
1240+
<Grid x:Name="TopicIconRoot"
1241+
IsHitTestVisible="False"
1242+
HorizontalAlignment="Right"
1243+
VerticalAlignment="Center">
1244+
<Path x:Name="TopicIconPath"
1245+
Data="M2.00008 16C2.00008 8.26801 8.2681 2 16.0001 2C23.7321 2 30.0001 8.26801 30.0001 16C30.0001 23.732 23.7321 30 16.0001 30C13.6316 30 11.398 29.4111 9.44042 28.3711L3.91211 29.9432C2.78178 30.2646 1.73759 29.2204 2.05902 28.0901L3.63078 22.563C2.58969 20.6046 2.00008 18.3698 2.00008 16Z" />
1246+
<TextBlock x:Name="TopicIconText"
1247+
TextAlignment="Center"
1248+
Foreground="#FFFFFF"
1249+
FontSize="16"
1250+
FontWeight="SemiBold"
1251+
HorizontalAlignment="Left"
1252+
Margin="0,4,0,0"
1253+
Width="32" />
1254+
</Grid>
1255+
1256+
<Path x:Name="TopicIconGeneral"
1257+
IsHitTestVisible="False"
1258+
Fill="{ThemeResource SystemControlForegroundBaseMediumBrush}"
1259+
HorizontalAlignment="Center"
1260+
VerticalAlignment="Center"
1261+
Data="M12.9797 3.20059C13.0904 2.65951 12.7415 2.13116 12.2004 2.02048C11.6593 1.90981 11.131 2.25872 11.0203 2.7998L9.75202 9.0002H4C3.44772 9.0002 3 9.44791 3 10.0002C3 10.5525 3.44772 11.0002 4 11.0002H9.34293L8.11566 17.0002H3C2.44772 17.0002 2 17.4479 2 18.0002C2 18.5525 2.44772 19.0002 3 19.0002H7.70657L6.52029 24.7998C6.40961 25.3409 6.75852 25.8692 7.2996 25.9799C7.84069 26.0906 8.36904 25.7417 8.47971 25.2006L9.74798 19.0002H15.7066L14.5203 24.7998C14.4096 25.3409 14.7585 25.8692 15.2996 25.9799C15.8407 26.0906 16.369 25.7417 16.4797 25.2006L17.748 19.0002H23C23.5523 19.0002 24 18.5525 24 18.0002C24 17.4479 23.5523 17.0002 23 17.0002H18.1571L19.3843 11.0002H24C24.5523 11.0002 25 10.5525 25 10.0002C25 9.44791 24.5523 9.0002 24 9.0002H19.7934L20.9797 3.20059C21.0904 2.65951 20.7415 2.13116 20.2004 2.02048C19.6593 1.90981 19.131 2.25872 19.0203 2.7998L17.752 9.0002H11.7934L12.9797 3.20059ZM16.1157 17.0002H10.1571L11.3843 11.0002H17.3429L16.1157 17.0002Z"
1262+
Visibility="Collapsed" />
1263+
</Grid>
12601264
</Grid>
12611265

12621266
<local:ChatHeaderButton x:Name="Profile"

Telegram/Views/ChatView.xaml.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -585,15 +585,15 @@ void Start(string key, UIElement element)
585585
}
586586
}
587587

588-
Start("Photo", Photo);
588+
Start("Photo", PhotoRoot);
589589
Start("Title", TitleRoot);
590590
Start("Subtitle", Subtitle);
591591
}
592592

593593
public void PrepareExit()
594594
{
595595
var service = ConnectedAnimationService.GetForCurrentView();
596-
service.PrepareToAnimate("Photo", Photo);
596+
service.PrepareToAnimate("Photo", PhotoRoot);
597597
service.PrepareToAnimate("Title", TitleRoot);
598598
service.PrepareToAnimate("Subtitle", Subtitle);
599599
}

0 commit comments

Comments
 (0)