diff options
Diffstat (limited to 'main')
-rw-r--r-- | main/src/addins/WindowsPlatform/WindowsPlatform/MainToolbar/StatusBar.xaml | 3 | ||||
-rw-r--r-- | main/src/addins/WindowsPlatform/WindowsPlatform/MainToolbar/StatusBar.xaml.cs | 11 |
2 files changed, 13 insertions, 1 deletions
diff --git a/main/src/addins/WindowsPlatform/WindowsPlatform/MainToolbar/StatusBar.xaml b/main/src/addins/WindowsPlatform/WindowsPlatform/MainToolbar/StatusBar.xaml index b941dd6179..7e103e69ba 100644 --- a/main/src/addins/WindowsPlatform/WindowsPlatform/MainToolbar/StatusBar.xaml +++ b/main/src/addins/WindowsPlatform/WindowsPlatform/MainToolbar/StatusBar.xaml @@ -44,7 +44,8 @@ Source="{Binding StatusImage}"
UseLayoutRounding="True"
MouseLeftButtonUp="OnShowPad" />
- <TextBlock Grid.Column="1"
+ <TextBlock x:Name="StatusText"
+ Grid.Column="1"
VerticalAlignment="Center"
Padding="7,1,0,2"
Foreground="{Binding StatusTextBrush}"
diff --git a/main/src/addins/WindowsPlatform/WindowsPlatform/MainToolbar/StatusBar.xaml.cs b/main/src/addins/WindowsPlatform/WindowsPlatform/MainToolbar/StatusBar.xaml.cs index dc1fabd45a..bba5020214 100644 --- a/main/src/addins/WindowsPlatform/WindowsPlatform/MainToolbar/StatusBar.xaml.cs +++ b/main/src/addins/WindowsPlatform/WindowsPlatform/MainToolbar/StatusBar.xaml.cs @@ -74,6 +74,16 @@ namespace WindowsPlatform.MainToolbar };
TaskService.Errors.TasksAdded += updateHandler;
TaskService.Errors.TasksRemoved += updateHandler;
+
+ StatusText.ToolTipOpening += (o, e) => {
+ e.Handled = !TextTrimmed ();
+ };
+ }
+
+ bool TextTrimmed ()
+ {
+ StatusText.Measure (new Size (double.PositiveInfinity, double.PositiveInfinity));
+ return StatusText.ActualWidth < StatusText.DesiredSize.Width;
}
public bool AutoPulse {
@@ -184,6 +194,7 @@ namespace WindowsPlatform.MainToolbar public void ShowMessage (IconId iconId, string message, bool isMarkup)
{
Message = message;
+ StatusText.ToolTip = message;
if (iconId.IsNull)
iconId = BrandingService.StatusSteadyIconId;
|