Skip to content

Commit daa0f51

Browse files
committed
Change icon for TimePicker @p76984275
Closes MahApps#2700 Update README
1 parent 2fed9c9 commit daa0f51

2 files changed

Lines changed: 21 additions & 2 deletions

File tree

docs/release-notes/1.4.0.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,18 @@ MahApps.Metro v1.4.0 bug fix and feature release.
77
- Don't focus flyout on close [#2671](https://github.com/MahApps/MahApps.Metro/pull/2671) (@ButchersBoy) This hack was introduced with [#1805](https://github.com/MahApps/MahApps.Metro/pull/1805) which was noticed by manual testing.
88
- Don't focus the `FlyoutsControl`
99
- Fix another `TopMost` issue: If the window is top most and you switch to another window the top most will be gone.
10+
- Change icon for TimePicker [#2700](https://github.com/MahApps/MahApps.Metro/pull/2700) (@p76984275)
11+
- Icon scaling [#2667](https://github.com/MahApps/MahApps.Metro/pull/2667) (@thoemmi)
12+
+ New property `IconScalingMode` to MetroWindow. It's forwarded to `MultiFrameImage.MultiFrameImageMode` to set the icon scaling.
13+
* `MultiFrameImageMode.ScaleDownLargerFrame`
14+
It takes the smallest frame which from the icon which has equal or larger size as the window's icon template. The frame is scaled down it's larger.
15+
![image](https://cloud.githubusercontent.com/assets/73690/11567498/8f05e644-99e7-11e5-9a50-b4dcec0a683e.png)
16+
* `MultiFrameImageMode.NoScaleSmallerFrame`
17+
It takes the largest frame from the window which has equal or smaller size than the window's icon template. The frame is rendered centered if it's smaller.
18+
![image](https://cloud.githubusercontent.com/assets/73690/11567646/3bb8e1fc-99e8-11e5-90f5-682d3d87527d.png)
1019

1120
# Closed Issues / PRs
1221

1322
- [#2674](https://github.com/MahApps/MahApps.Metro/issues/2674), [#2671](https://github.com/MahApps/MahApps.Metro/pull/2671) Null Reference Exception in BorderlessWindowBehavior.TopMostChangeNotifierOnValueChanged (@mikeasage)
23+
- [#2671](https://github.com/MahApps/MahApps.Metro/pull/2671) Proposal - Dont focus flyout on close
24+
- [#2699](https://github.com/MahApps/MahApps.Metro/issues/2699) [Suggestion] TimePicker & DateTimePicker Icon

src/MahApps.Metro/MahApps.Metro/Themes/DateTimePicker.xaml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,8 @@
180180
Style="{DynamicResource ChromelessButtonStyle}"
181181
IsTabStop="False">
182182
<!-- PackIconModern - Calendar14 -->
183-
<ContentControl Style="{DynamicResource PathIconContentControlStyle}"
183+
<ContentControl x:Name="PART_ButtonIcon"
184+
Style="{DynamicResource PathIconContentControlStyle}"
184185
Content="M34,52H31V38.5C29.66,39.9 28.16,40.78 26.34,41.45V37.76C27.3,37.45 28.34,36.86 29.46,36C30.59,35.15 31.36,34.15 31.78,33H34V52M45,52V48H37V45L45,33H48V45H50V48H48V52H45M45,45V38.26L40.26,45H45M18,57V23H23V20A2,2 0 0,1 25,18H29C30.11,18 31,18.9 31,20V23H45V20A2,2 0 0,1 47,18H51C52.11,18 53,18.9 53,20V23H58V57H18M21,54H55V31H21V54M48.5,20A1.5,1.5 0 0,0 47,21.5V24.5A1.5,1.5 0 0,0 48.5,26H49.5C50.34,26 51,25.33 51,24.5V21.5A1.5,1.5 0 0,0 49.5,20H48.5M26.5,20A1.5,1.5 0 0,0 25,21.5V24.5A1.5,1.5 0 0,0 26.5,26H27.5A1.5,1.5 0 0,0 29,24.5V21.5A1.5,1.5 0 0,0 27.5,20H26.5Z"
185186
Padding="2"
186187
Width="{TemplateBinding controls:TextBoxHelper.ButtonWidth}"
@@ -363,7 +364,14 @@
363364
<Setter TargetName="StackPanel" Property="Orientation" Value="{Binding Path=Orientation, RelativeSource={RelativeSource TemplatedParent}}" />
364365
<Setter TargetName="PART_TextBox" Property="Text" Value="{Binding Path=SelectedDate, RelativeSource={RelativeSource TemplatedParent}}" />
365366
</Trigger>
366-
367+
<Trigger Property="IsDatePickerVisible"
368+
Value="False">
369+
<!-- PackIconMaterial - Clock -->
370+
<Setter TargetName="PART_ButtonIcon"
371+
Property="Content"
372+
Value="M12,20A8,8 0 0,0 20,12A8,8 0 0,0 12,4A8,8 0 0,0 4,12A8,8 0 0,0 12,20M12,2A10,10 0 0,1 22,12A10,10 0 0,1 12,22C6.47,22 2,17.5 2,12A10,10 0 0,1 12,2M12.5,7V12.25L17,14.92L16.25,16.15L11,13V7H12.5Z" />
373+
</Trigger>
374+
367375
<MultiDataTrigger>
368376
<MultiDataTrigger.Conditions>
369377
<Condition Binding="{Binding Path=(controls:TextBoxHelper.UseFloatingWatermark), RelativeSource={RelativeSource Self}}" Value="True" />

0 commit comments

Comments
 (0)