From a8eb217e4a5c522d9d7ea8071501bff78d8a15dc Mon Sep 17 00:00:00 2001 From: bubnikv Date: Sun, 19 Feb 2017 19:08:58 +0100 Subject: [PATCH] System Info dialog made nicer. Fixed a bug in reporting a software renderer on Windows. --- lib/Slic3r.pm | 4 ++-- lib/Slic3r/GUI/GLShader.pm | 10 ++++------ lib/Slic3r/GUI/SystemInfo.pm | 10 +++++----- 3 files changed, 11 insertions(+), 13 deletions(-) diff --git a/lib/Slic3r.pm b/lib/Slic3r.pm index f97444139..928b80dd9 100644 --- a/lib/Slic3r.pm +++ b/lib/Slic3r.pm @@ -350,8 +350,8 @@ sub tags { # End of line $tags{eol} = ($format eq 'html') ? '
' : "\n"; # Heading - $tags{h2start} = ($format eq 'html') ? '

' : ''; - $tags{h2end} = ($format eq 'html') ? '

' : ''; + $tags{h2start} = ($format eq 'html') ? '' : ''; + $tags{h2end} = ($format eq 'html') ? '' : ''; # Bold font $tags{bstart} = ($format eq 'html') ? '' : ''; $tags{bend} = ($format eq 'html') ? '' : ''; diff --git a/lib/Slic3r/GUI/GLShader.pm b/lib/Slic3r/GUI/GLShader.pm index c2af3e38f..8db05f5e8 100644 --- a/lib/Slic3r/GUI/GLShader.pm +++ b/lib/Slic3r/GUI/GLShader.pm @@ -44,12 +44,10 @@ sub new my $glsl_version = glGetString(GL_SHADING_LANGUAGE_VERSION) // $glsl_version_ARB; $glsl_version .= 'ARB(' . $glsl_version_ARB . ')' if ($glsl_version_ARB ne '' && $glsl_version ne $glsl_version_ARB); my $out = ''; - if ($^O eq 'MSWin32') { - if ($gl_vendor eq 'Microsoft Corporation' && $renderer eq 'GDI Generic') { - $out .= "Windows is using a software OpenGL renderer.\n"; - $out .= "You are either connected over remote desktop,\n"; - $out .= "or a hardware acceleration is not available.\n"; - } + if ($^O eq 'MSWin32' && $gl_vendor eq 'Microsoft Corporation' && $gl_renderer eq 'GDI Generic') { + $out .= "Windows is using a software OpenGL renderer.\n"; + $out .= "You are either connected over remote desktop,\n"; + $out .= "or a hardware acceleration is not available.\n"; } $out .= "GL version: ${gl_version}\n"; $out .= "vendor: ${gl_vendor}\n"; diff --git a/lib/Slic3r/GUI/SystemInfo.pm b/lib/Slic3r/GUI/SystemInfo.pm index 23a85952c..717ff12e5 100644 --- a/lib/Slic3r/GUI/SystemInfo.pm +++ b/lib/Slic3r/GUI/SystemInfo.pm @@ -30,11 +30,11 @@ sub new { ''; my $html = $self->{html} = Wx::HtmlWindow->new($self, -1, wxDefaultPosition, wxDefaultSize, wxHW_SCROLLBAR_AUTO); my $font = Wx::SystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT); -# my $size = &Wx::wxMSW ? 8 : 10; -# $html->SetFonts($font->GetFaceName, $font->GetFaceName, [$size, $size, $size, $size, $size, $size, $size]); - $html->SetBorders(2); + my $size = &Wx::wxMSW ? 8 : 10; + $html->SetFonts($font->GetFaceName, $font->GetFaceName, [$size * 1.5, $size * 1.4, $size * 1.3, $size, $size, $size, $size]); + $html->SetBorders(10); $html->SetPage($text); - $vsizer->Add($html, 1, wxEXPAND | wxALIGN_LEFT | wxRIGHT | wxBOTTOM, 20); + $vsizer->Add($html, 1, wxEXPAND | wxALIGN_LEFT | wxRIGHT | wxBOTTOM, 0); EVT_HTML_LINK_CLICKED($self, $html, \&link_clicked); my $buttons = $self->CreateStdDialogButtonSizer(wxOK); @@ -47,7 +47,7 @@ sub new { $self->Close; }); # $vsizer->Add($buttons, 0, wxEXPAND | wxRIGHT | wxBOTTOM, 3); - $vsizer->Add($buttons, 0, wxEXPAND | wxALL, 3); + $vsizer->Add($buttons, 0, wxEXPAND | wxALL, 5); return $self; }