Skip to content

Commit

Permalink
System Info dialog made nicer.
Browse files Browse the repository at this point in the history
Fixed a bug in reporting a software renderer on Windows.
  • Loading branch information
bubnikv committed Feb 19, 2017
1 parent 898deb4 commit a8eb217
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 13 deletions.
4 changes: 2 additions & 2 deletions lib/Slic3r.pm
Original file line number Diff line number Diff line change
Expand Up @@ -350,8 +350,8 @@ sub tags {
# End of line
$tags{eol} = ($format eq 'html') ? '<br>' : "\n";
# Heading
$tags{h2start} = ($format eq 'html') ? '<h2>' : '';
$tags{h2end} = ($format eq 'html') ? '</h2>' : '';
$tags{h2start} = ($format eq 'html') ? '<b>' : '';
$tags{h2end} = ($format eq 'html') ? '</b>' : '';
# Bold font
$tags{bstart} = ($format eq 'html') ? '<b>' : '';
$tags{bend} = ($format eq 'html') ? '</b>' : '';
Expand Down
10 changes: 4 additions & 6 deletions lib/Slic3r/GUI/GLShader.pm
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down
10 changes: 5 additions & 5 deletions lib/Slic3r/GUI/SystemInfo.pm
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ sub new {
'</html>';
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);
Expand All @@ -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;
}
Expand Down

0 comments on commit a8eb217

Please sign in to comment.