Use system color instead of hard-coding white background (support dark themes). #3977

This commit is contained in:
Alessandro Ranellucci 2017-05-29 19:34:38 +02:00
parent 10efa91104
commit bc07e6a0a4

View File

@ -550,10 +550,10 @@ sub new {
my $self = $class->SUPER::new($parent, -1, wxDefaultPosition, wxDefaultSize); my $self = $class->SUPER::new($parent, -1, wxDefaultPosition, wxDefaultSize);
$self->job($job); $self->job($job);
$self->SetBackgroundColour(wxWHITE); $self->SetBackgroundColour(Wx::SystemSettings::GetColour(Wx::wxSYS_COLOUR_LISTBOX));
{ {
my $white_brush = Wx::Brush->new(wxWHITE, wxSOLID); my $white_brush = Wx::Brush->new($self->GetBackgroundColour, wxSOLID);
my $pen = Wx::Pen->new(Wx::Colour->new(200,200,200), 1, wxSOLID); my $pen = Wx::Pen->new(Wx::Colour->new(200,200,200), 1, wxSOLID);
EVT_ERASE_BACKGROUND($self, sub { EVT_ERASE_BACKGROUND($self, sub {
my ($self, $event) = @_; my ($self, $event) = @_;