Put in many more tool tips.

This commit is contained in:
Lars Brubaker 2015-08-12 13:16:39 -07:00
parent d62a5f7fce
commit 0ef5747ca9
13 changed files with 69 additions and 70 deletions

View file

@ -246,6 +246,8 @@ namespace MatterHackers.MatterControl.ActionBar
ButtonViewStates buttonView = new ButtonViewStates(buttonWidgetNormal, buttonWidgetHover, buttonWidgetPressed, buttonWidgetDisabled);
buttonView.HAnchor = HAnchor.ParentLeftRight;
this.ToolTipText = "Select a printer".Localize();
Margin = DefaultMargin;
OriginRelativeParent = new Vector2(0, 0);

View file

@ -69,6 +69,7 @@ namespace MatterHackers.MatterControl.ActionBar
string connectString = "Connect".Localize().ToUpper();
connectPrinterButton = actionBarButtonFactory.Generate(connectString, "icon_power_32x32.png");
connectPrinterButton.ToolTipText = "Connect to the currently selected printer".Localize();
if (ApplicationController.Instance.WidescreenMode)
{
connectPrinterButton.Margin = new BorderDouble(0, 0, 3, 3);
@ -82,6 +83,7 @@ namespace MatterHackers.MatterControl.ActionBar
string disconnectString = "Disconnect".Localize().ToUpper();
disconnectPrinterButton = actionBarButtonFactory.Generate(disconnectString, "icon_power_32x32.png");
disconnectPrinterButton.ToolTipText = "Disconnect from current printer".Localize();
if (ApplicationController.Instance.WidescreenMode)
{
disconnectPrinterButton.Margin = new BorderDouble(0, 0, 3, 3);

View file

@ -38,8 +38,8 @@ namespace MatterHackers.MatterControl.ActionBar
{
internal class TemperatureWidgetBase : GuiWidget
{
protected TextWidget indicatorTextWidget;
protected TextWidget labelTextWidget;
protected TextWidget currentTempIndicator;
protected TextWidget temperatureTypeName;
protected Button preheatButton;
protected TextImageButtonFactory whiteButtonFactory = new TextImageButtonFactory();
@ -51,13 +51,13 @@ namespace MatterHackers.MatterControl.ActionBar
{
get
{
return indicatorTextWidget.Text;
return currentTempIndicator.Text;
}
set
{
if (indicatorTextWidget.Text != value)
if (currentTempIndicator.Text != value)
{
indicatorTextWidget.Text = value;
currentTempIndicator.Text = value;
}
}
}
@ -72,35 +72,22 @@ namespace MatterHackers.MatterControl.ActionBar
whiteButtonFactory.normalFillColor = RGBA_Bytes.White;
whiteButtonFactory.normalTextColor = RGBA_Bytes.DarkGray;
FlowLayoutWidget container = new FlowLayoutWidget(FlowDirection.TopToBottom);
container.AnchorAll();
this.BackgroundColor = new RGBA_Bytes(255, 255, 255, 200);
this.Margin = new BorderDouble(0, 2) * TextWidget.GlobalPointSizeScaleRatio;
GuiWidget labelContainer = new GuiWidget();
labelContainer.HAnchor = Agg.UI.HAnchor.ParentLeftRight;
labelContainer.Height = 18 * TextWidget.GlobalPointSizeScaleRatio;
temperatureTypeName = new TextWidget("", pointSize: 8);
temperatureTypeName.AutoExpandBoundsToText = true;
temperatureTypeName.HAnchor = HAnchor.ParentCenter;
temperatureTypeName.VAnchor = VAnchor.ParentTop;
temperatureTypeName.Margin = new BorderDouble(0, 3);
temperatureTypeName.TextColor = ActiveTheme.Instance.SecondaryAccentColor;
temperatureTypeName.Visible = false;
labelTextWidget = new TextWidget("", pointSize: 8);
labelTextWidget.AutoExpandBoundsToText = true;
labelTextWidget.HAnchor = HAnchor.ParentCenter;
labelTextWidget.VAnchor = VAnchor.ParentCenter;
labelTextWidget.TextColor = ActiveTheme.Instance.SecondaryAccentColor;
labelTextWidget.Visible = false;
labelContainer.AddChild(labelTextWidget);
GuiWidget indicatorContainer = new GuiWidget();
indicatorContainer.AnchorAll();
indicatorTextWidget = new TextWidget(textValue, pointSize: 11);
indicatorTextWidget.TextColor = ActiveTheme.Instance.PrimaryAccentColor;
indicatorTextWidget.HAnchor = HAnchor.ParentCenter;
indicatorTextWidget.VAnchor = VAnchor.ParentCenter;
indicatorTextWidget.AutoExpandBoundsToText = true;
indicatorContainer.AddChild(indicatorTextWidget);
currentTempIndicator = new TextWidget(textValue, pointSize: 11);
currentTempIndicator.TextColor = ActiveTheme.Instance.PrimaryAccentColor;
currentTempIndicator.HAnchor = HAnchor.ParentCenter;
currentTempIndicator.VAnchor = VAnchor.ParentCenter;
currentTempIndicator.AutoExpandBoundsToText = true;
GuiWidget buttonContainer = new GuiWidget();
buttonContainer.HAnchor = Agg.UI.HAnchor.ParentLeftRight;
@ -112,11 +99,10 @@ namespace MatterHackers.MatterControl.ActionBar
buttonContainer.AddChild(preheatButton);
container.AddChild(labelContainer);
container.AddChild(indicatorContainer);
container.AddChild(buttonContainer);
this.AddChild(temperatureTypeName);
this.AddChild(currentTempIndicator);
this.AddChild(buttonContainer);
this.AddChild(container);
ActiveTheme.Instance.ThemeChanged.RegisterEvent(ThemeChanged, ref unregisterEvents);
this.MouseEnterBounds += onEnterBounds;
@ -135,13 +121,13 @@ namespace MatterHackers.MatterControl.ActionBar
public void ThemeChanged(object sender, EventArgs e)
{
this.indicatorTextWidget.TextColor = ActiveTheme.Instance.PrimaryAccentColor;
this.currentTempIndicator.TextColor = ActiveTheme.Instance.PrimaryAccentColor;
this.Invalidate();
}
private void onEnterBounds(Object sender, EventArgs e)
{
labelTextWidget.Visible = true;
temperatureTypeName.Visible = true;
if (PrinterConnectionAndCommunication.Instance.PrinterIsConnected && !PrinterConnectionAndCommunication.Instance.PrinterIsPrinting)
{
preheatButton.Visible = true;
@ -150,7 +136,7 @@ namespace MatterHackers.MatterControl.ActionBar
private void onLeaveBounds(Object sender, EventArgs e)
{
labelTextWidget.Visible = false;
temperatureTypeName.Visible = false;
preheatButton.Visible = false;
}

View file

@ -40,9 +40,11 @@ namespace MatterHackers.MatterControl.ActionBar
public TemperatureWidgetBed()
: base("150.3°")
{
labelTextWidget.Text = "Print Bed";
temperatureTypeName.Text = "Print Bed";
AddHandlers();
setToCurrentTemperature();
ToolTipText = "Current bed temperature".Localize();
preheatButton.ToolTipText = "Preheat the Bed".Localize();
}
private event EventHandler unregisterEvents;

View file

@ -41,9 +41,12 @@ namespace MatterHackers.MatterControl.ActionBar
public TemperatureWidgetExtruder()
: base("150.3°")
{
labelTextWidget.Text = "Extruder";
temperatureTypeName.Text = "Extruder";
AddHandlers();
setToCurrentTemperature();
ToolTipText = "Current extruder temperature".Localize();
preheatButton.ToolTipText = "Preheat the Extruder".Localize();
}
private event EventHandler unregisterEvents;

View file

@ -59,6 +59,7 @@ namespace MatterHackers.MatterControl
linkButtonFactory.fontSize = 8;
Button signInLink = linkButtonFactory.Generate("(Sign Out)");
signInLink.ToolTipText = "Sign in to your MatterControl account".Localize();
signInLink.VAnchor = Agg.UI.VAnchor.ParentCenter;
signInLink.Margin = new BorderDouble(top: 0);

View file

@ -125,38 +125,35 @@ namespace MatterHackers.MatterControl.PrintLibrary
set
{
if (currentLibraryProvider != value)
// unhook the update we were getting
currentLibraryProvider.DataReloaded -= libraryDataViewInstance.LibraryDataReloaded;
// and hook the new one
value.DataReloaded += libraryDataViewInstance.LibraryDataReloaded;
bool isChildOfCurrent = value.ParentLibraryProvider == currentLibraryProvider;
// Dispose of all children below this one.
while (!isChildOfCurrent && currentLibraryProvider != value
&& currentLibraryProvider.ParentLibraryProvider != null)
{
// unhook the update we were getting
currentLibraryProvider.DataReloaded -= libraryDataViewInstance.LibraryDataReloaded;
// and hook the new one
value.DataReloaded += libraryDataViewInstance.LibraryDataReloaded;
bool isChildOfCurrent = value.ParentLibraryProvider == currentLibraryProvider;
// Dispose of all children below this one.
while (!isChildOfCurrent && currentLibraryProvider != value
&& currentLibraryProvider.ParentLibraryProvider != null)
{
LibraryProvider parent = currentLibraryProvider.ParentLibraryProvider;
currentLibraryProvider.Dispose();
currentLibraryProvider = parent;
}
LibraryProvider previousLibraryProvider = currentLibraryProvider;
currentLibraryProvider = value;
if (ChangedCurrentLibraryProvider != null)
{
ChangedCurrentLibraryProvider(previousLibraryProvider, value);
}
ClearSelectedItems();
this.ProviderMessage = value.StatusMessage;
UiThread.RunOnIdle(RebuildView);
LibraryProvider parent = currentLibraryProvider.ParentLibraryProvider;
currentLibraryProvider.Dispose();
currentLibraryProvider = parent;
}
LibraryProvider previousLibraryProvider = currentLibraryProvider;
currentLibraryProvider = value;
if (ChangedCurrentLibraryProvider != null)
{
ChangedCurrentLibraryProvider(previousLibraryProvider, value);
}
ClearSelectedItems();
this.ProviderMessage = value.StatusMessage;
UiThread.RunOnIdle(RebuildView);
}
}

View file

@ -199,6 +199,7 @@ namespace MatterHackers.MatterControl.PrintLibrary
// the add button
{
addToLibraryButton = textImageButtonFactory.Generate(LocalizedString.Get("Add"), "icon_circle_plus.png");
addToLibraryButton.ToolTipText = "Add an .stl, .amf, .gcode or .zip file to the Library".Localize();
buttonPanel.AddChild(addToLibraryButton);
addToLibraryButton.Margin = new BorderDouble(0, 0, 3, 0);
addToLibraryButton.Click += (sender, e) => UiThread.RunOnIdle(importToLibraryloadFile_ClickOnIdle);

View file

@ -323,6 +323,7 @@ namespace MatterHackers.MatterControl
}
Button addMacroButton = textImageButtonFactory.Generate(LocalizedString.Get("Add"), "icon_circle_plus.png");
addMacroButton.ToolTipText = "Add an new Macro".Localize();
addMacroButton.Click += new EventHandler(addMacro_Click);
Button cancelPresetsButton = textImageButtonFactory.Generate(LocalizedString.Get("Close"));

View file

@ -147,6 +147,7 @@ namespace MatterHackers.MatterControl.PrinterControls.PrinterConnections
closeButton = textImageButtonFactory.Generate(LocalizedString.Get("Close"));
Button addPrinterButton = textImageButtonFactory.Generate(LocalizedString.Get("Add"), "icon_circle_plus.png");
addPrinterButton.ToolTipText = "Add a new Printer Profile".Localize();
addPrinterButton.Click += new EventHandler(AddConnectionLink_Click);
Button refreshListButton = textImageButtonFactory.Generate(LocalizedString.Get("Refresh"));

View file

@ -180,6 +180,7 @@ namespace MatterHackers.MatterControl.PrintQueue
if (OemSettings.Instance.ShowShopButton)
{
shopButton = textImageButtonFactory.Generate(LocalizedString.Get("Buy Materials"), "icon_shopping_cart_32x32.png");
shopButton.ToolTipText = "Shop online for printing materials".Localize();
buttonPanel1.AddChild(shopButton);
shopButton.Margin = new BorderDouble(0, 0, 3, 0);
shopButton.Click += (sender, e) =>

View file

@ -123,6 +123,7 @@ namespace MatterHackers.MatterControl.SlicerConfiguration
container.HAnchor = HAnchor.ParentLeftRight;
Button addPresetButton = buttonFactory.Generate(LocalizedString.Get("Add"), "icon_circle_plus.png");
addPresetButton.ToolTipText = "Add a new Material Preset".Localize();
addPresetButton.Click += (sender, e) =>
{
UiThread.RunOnIdle(() =>
@ -132,6 +133,7 @@ namespace MatterHackers.MatterControl.SlicerConfiguration
};
importPresetButton = buttonFactory.Generate(LocalizedString.Get("Import"));
importPresetButton.ToolTipText = "Import an existing Material Preset".Localize();
Button closeButton = buttonFactory.Generate(LocalizedString.Get("Close"));
closeButton.Click += (sender, e) =>

@ -1 +1 @@
Subproject commit c1645a38ee7c8496e21c8c3576759e4135e4395a
Subproject commit 5f57c69fa2c55f9767c4ed113a554f1c1d81a0b5