Ignore:
Timestamp:
Aug 29, 2017, 10:33:39 PM (7 years ago)
Author:
chronos
Message:
  • Modified: Enabled DPI scaling.
  • Modified: Moved ImageListMain to Core unit and introduced Core Init method.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Forms/UFormMain.pas

    r83 r88  
    3939    AProjectOpen: TAction;
    4040    ActionList1: TActionList;
    41     ImageListMain: TImageList;
    4241    MainMenu1: TMainMenu;
    4342    MenuItem1: TMenuItem;
     
    189188procedure TFormMain.FormShow(Sender: TObject);
    190189begin
    191   // TODO: Transparent image scaling not working properly under linux Gtk2
    192   // Also screen DPI is not correctly detected under linux Gtk2
    193   {$IFDEF WINDOWS}
    194   with Core.ScaleDPI do begin
    195     ApplyToAll(DesignDPI);
    196     ScaleImageList(ImageListMain, DesignDPI);
    197   end;
    198   {$ENDIF}
    199 
    200   Core.CoolTranslator1.Translate;
     190  Core.Init;
    201191  LoadFromRegistry(HKEY(Core.ApplicationInfo.RegistryRoot), Core.ApplicationInfo.RegistryKey);
    202192  PageControlMain.TabIndex := 0;
     
    520510    FormAbout.ApplicationInfo := Core.ApplicationInfo;
    521511    FormAbout.CoolTranslator := Core.CoolTranslator1;
     512    Core.ScaleDPI1.ScaleControl(FormAbout, Core.ScaleDPI1.DesignDPI);
    522513    FormAbout.ShowModal;
    523514  finally
Note: See TracChangeset for help on using the changeset viewer.