Make tabs able to be smaller
This commit is contained in:
parent
3f4280875b
commit
26cdcbe1f9
3 changed files with 36 additions and 40 deletions
|
|
@ -97,7 +97,6 @@
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="Microsoft.AspNet.WebApi.Client" Version="5.2.9" />
|
<PackageReference Include="Microsoft.AspNet.WebApi.Client" Version="5.2.9" />
|
||||||
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" />
|
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" />
|
||||||
<PackageReference Include="Mindscape.Raygun4Net.NetCore" Version="6.4.3" />
|
|
||||||
<PackageReference Include="ServiceWire" Version="5.5.4" />
|
<PackageReference Include="ServiceWire" Version="5.5.4" />
|
||||||
<PackageReference Include="SocketIoClientDotNet">
|
<PackageReference Include="SocketIoClientDotNet">
|
||||||
<Version>1.0.2-beta1</Version>
|
<Version>1.0.2-beta1</Version>
|
||||||
|
|
|
||||||
|
|
@ -1029,7 +1029,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
||||||
private static void EnableReduceWidth(ChromeTab partTab, ThemeConfig theme)
|
private static void EnableReduceWidth(ChromeTab partTab, ThemeConfig theme)
|
||||||
{
|
{
|
||||||
var scale = GuiWidget.DeviceScale;
|
var scale = GuiWidget.DeviceScale;
|
||||||
partTab.MinimumSize = new Vector2(80 * scale, theme.TabButtonHeight);
|
partTab.MinimumSize = new Vector2(40 * scale, theme.TabButtonHeight);
|
||||||
|
|
||||||
var textWidget = partTab.Descendants<TextWidget>().First();
|
var textWidget = partTab.Descendants<TextWidget>().First();
|
||||||
var tabPill = partTab.Descendants<SimpleTab.TabPill>().First();
|
var tabPill = partTab.Descendants<SimpleTab.TabPill>().First();
|
||||||
|
|
|
||||||
73
Program.cs
73
Program.cs
|
|
@ -42,7 +42,6 @@ using MatterHackers.MatterControl.SettingsManagement;
|
||||||
using MatterHackers.MatterControl.SlicerConfiguration;
|
using MatterHackers.MatterControl.SlicerConfiguration;
|
||||||
using MatterHackers.SerialPortCommunication.FrostedSerial;
|
using MatterHackers.SerialPortCommunication.FrostedSerial;
|
||||||
using Microsoft.Extensions.Configuration;
|
using Microsoft.Extensions.Configuration;
|
||||||
using Mindscape.Raygun4Net;
|
|
||||||
using SQLiteWin32;
|
using SQLiteWin32;
|
||||||
|
|
||||||
namespace MatterHackers.MatterControl
|
namespace MatterHackers.MatterControl
|
||||||
|
|
@ -63,11 +62,11 @@ namespace MatterHackers.MatterControl
|
||||||
[DllImport("kernel32.dll", CharSet = CharSet.Auto, SetLastError = true)]
|
[DllImport("kernel32.dll", CharSet = CharSet.Auto, SetLastError = true)]
|
||||||
static extern EXECUTION_STATE SetThreadExecutionState(EXECUTION_STATE esFlags);
|
static extern EXECUTION_STATE SetThreadExecutionState(EXECUTION_STATE esFlags);
|
||||||
|
|
||||||
private const int RaygunMaxNotifications = 15;
|
//private const int RaygunMaxNotifications = 15;
|
||||||
|
|
||||||
private static int raygunNotificationCount = 0;
|
//private static int raygunNotificationCount = 0;
|
||||||
|
|
||||||
private static RaygunClient _raygunClient;
|
//private static RaygunClient _raygunClient;
|
||||||
|
|
||||||
[DllImport("Shcore.dll")]
|
[DllImport("Shcore.dll")]
|
||||||
static extern int SetProcessDpiAwareness(int PROCESS_DPI_AWARENESS);
|
static extern int SetProcessDpiAwareness(int PROCESS_DPI_AWARENESS);
|
||||||
|
|
@ -175,10 +174,10 @@ namespace MatterHackers.MatterControl
|
||||||
|
|
||||||
string userProfilePath = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile);
|
string userProfilePath = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile);
|
||||||
|
|
||||||
_raygunClient = new RaygunClient("hQIlyUUZRGPyXVXbI6l1dA==") // this is the PC key
|
//_raygunClient = new RaygunClient("hQIlyUUZRGPyXVXbI6l1dA==") // this is the PC key
|
||||||
{
|
//{
|
||||||
ApplicationVersion = VersionInfo.Instance.ReleaseVersion
|
// ApplicationVersion = VersionInfo.Instance.ReleaseVersion
|
||||||
};
|
//};
|
||||||
|
|
||||||
// If MatterControl isn't running and valid files were shelled, schedule a StartupAction to open the files after load
|
// If MatterControl isn't running and valid files were shelled, schedule a StartupAction to open the files after load
|
||||||
var shellFiles = args.Where(f => File.Exists(f) && ApplicationController.ShellFileExtensions.Contains(Path.GetExtension(f).ToLower())).ToArray();
|
var shellFiles = args.Where(f => File.Exists(f) && ApplicationController.ShellFileExtensions.Contains(Path.GetExtension(f).ToLower())).ToArray();
|
||||||
|
|
@ -241,39 +240,37 @@ namespace MatterHackers.MatterControl
|
||||||
SetProcessDpiAwareness((int)DpiAwareness.PerMonitorAware);
|
SetProcessDpiAwareness((int)DpiAwareness.PerMonitorAware);
|
||||||
}
|
}
|
||||||
|
|
||||||
var isExperimental = OemSettings.Instance.WindowTitleExtra == "Experimental";
|
//var isExperimental = OemSettings.Instance.WindowTitleExtra == "Experimental";
|
||||||
#if !DEBUG
|
//// Conditionally spin up error reporting if not on the Stable channel
|
||||||
// Conditionally spin up error reporting if not on the Stable channel
|
//string channel = UserSettings.Instance.get(UserSettingsKey.UpdateFeedType);
|
||||||
string channel = UserSettings.Instance.get(UserSettingsKey.UpdateFeedType);
|
//if (string.IsNullOrEmpty(channel)
|
||||||
if (string.IsNullOrEmpty(channel)
|
// || channel != "release"
|
||||||
|| channel != "release"
|
// || isExperimental)
|
||||||
|| isExperimental)
|
//{
|
||||||
#endif
|
// System.Windows.Forms.Application.ThreadException += (s, e) =>
|
||||||
{
|
// {
|
||||||
System.Windows.Forms.Application.ThreadException += (s, e) =>
|
// if (raygunNotificationCount++ < RaygunMaxNotifications)
|
||||||
{
|
// {
|
||||||
if (raygunNotificationCount++ < RaygunMaxNotifications)
|
// _raygunClient.Send(e.Exception);
|
||||||
{
|
// }
|
||||||
_raygunClient.Send(e.Exception);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (System.Windows.Forms.Application.OpenForms.Count > 0
|
// if (System.Windows.Forms.Application.OpenForms.Count > 0
|
||||||
&& !System.Windows.Forms.Application.OpenForms[0].InvokeRequired)
|
// && !System.Windows.Forms.Application.OpenForms[0].InvokeRequired)
|
||||||
{
|
// {
|
||||||
System.Windows.Forms.Application.Exit();
|
// System.Windows.Forms.Application.Exit();
|
||||||
}
|
// }
|
||||||
};
|
// };
|
||||||
|
|
||||||
AppDomain.CurrentDomain.UnhandledException += (s, e) =>
|
// AppDomain.CurrentDomain.UnhandledException += (s, e) =>
|
||||||
{
|
// {
|
||||||
if (raygunNotificationCount++ < RaygunMaxNotifications)
|
// if (raygunNotificationCount++ < RaygunMaxNotifications)
|
||||||
{
|
// {
|
||||||
_raygunClient.Send(e.ExceptionObject as Exception);
|
// _raygunClient.Send(e.ExceptionObject as Exception);
|
||||||
}
|
// }
|
||||||
|
|
||||||
System.Windows.Forms.Application.Exit();
|
// System.Windows.Forms.Application.Exit();
|
||||||
};
|
// };
|
||||||
}
|
//}
|
||||||
|
|
||||||
// Init platformFeaturesProvider before ShowAsSystemWindow
|
// Init platformFeaturesProvider before ShowAsSystemWindow
|
||||||
string platformFeaturesProvider = "MatterHackers.MatterControl.WindowsPlatformsFeatures, MatterControl.Winforms";
|
string platformFeaturesProvider = "MatterHackers.MatterControl.WindowsPlatformsFeatures, MatterControl.Winforms";
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue