Changeset 194 for trunk/Back.pas


Ignore:
Timestamp:
May 7, 2020, 8:39:24 PM (5 years ago)
Author:
chronos
Message:
  • Fixed: Locale configuration in configuration was not working as expected. ModalResult of Ok and Cancel buttons was opposite. Selected locale was not applied during application startup.
  • Fixed: Updating fullscreen mode after changeing mode in configuration window.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Back.pas

    r189 r194  
    1919  private
    2020    Img: TBitmap;
     21  public
     22    procedure UpdateInterface;
    2123  end;
    2224
     
    3739
    3840procedure TBackground.FormShow(Sender: TObject);
    39 var
    40   FileName: string;
    4141begin
    42   if FullScreen then begin
    43     if not Assigned(Img) then begin
    44       FileName := GetGraphicsDir + DirectorySeparator + 'Background.png';
    45       if FileExists(FileName) then begin
    46         Img := TBitmap.Create;
    47         LoadGraphicFile(img, FileName);
    48       end;
    49     end;
    50   end else begin
    51     WindowState := wsNormal;
    52     Width := StartDlg.Width + 16;
    53     Height := StartDlg.Height + 16;
    54     Left := StartDlg.Left - 8;
    55     Top := StartDlg.Top - 8;
    56   end;
     42  UpdateInterface;
    5743end;
    5844
     
    7460end;
    7561
     62procedure TBackground.UpdateInterface;
     63var
     64  FileName: string;
     65begin
     66  if FullScreen then begin
     67    WindowState := wsMaximized;
     68    if not Assigned(Img) then begin
     69      FileName := GetGraphicsDir + DirectorySeparator + 'Background.png';
     70      if FileExists(FileName) then begin
     71        Img := TBitmap.Create;
     72        LoadGraphicFile(img, FileName);
     73      end;
     74    end;
     75  end else begin
     76    WindowState := wsNormal;
     77    Width := StartDlg.Width + 16;
     78    Height := StartDlg.Height + 16;
     79    Left := StartDlg.Left - 8;
     80    Top := StartDlg.Top - 8;
     81  end;
     82end;
     83
    7684end.
Note: See TracChangeset for help on using the changeset viewer.