mirror of
https://github.com/winscp/winscp.git
synced 2026-10-24 02:28:55 +03:00
– Control's Canvas does not have Font updated when painting, so it needs to be set explicitly in some places – Page control drawing was not only incompatible, but broken in general, so it was refactored – giving up on trying to make it 100% mimic system drawing – CM_DPICHANGED replaced with OnAfterMonitorDpiChanged for form-level scaling. Not really necessary, just for style. Though it is not called for initial resize (at least when starting on primary monitor with temporary non-system DPI) – OnResize is not called for DPI change, so in some instances, some OnResize call was duplicated in OnAfterMonitorDpiChanged/CM_DPICHANGED – Scaling of thirdparty box still does not work correctly (but Updates box works??) – Scaling on primary monitor with temporary non-system DPI is bad – TTreeView enabled DPI scaling when using Images that is not Scaled – Discaring obsolete FSiteButtonsPadding workaround – Controls programmatically added to form are automatically scaled to the form's DPI (relevant for message boxes) Source commit: a86dddbfada30a5bc409687489bdcd12842050af
52 lines
1.8 KiB
C++
52 lines
1.8 KiB
C++
//---------------------------------------------------------------------------
|
|
#ifndef CopyLocalH
|
|
#define CopyLocalH
|
|
//---------------------------------------------------------------------------
|
|
#include <System.Classes.hpp>
|
|
#include <Vcl.Controls.hpp>
|
|
#include <Vcl.StdCtrls.hpp>
|
|
#include <Vcl.Forms.hpp>
|
|
#include "HistoryComboBox.hpp"
|
|
#include <Vcl.ExtCtrls.hpp>
|
|
#include <GUITools.h>
|
|
//---------------------------------------------------------------------------
|
|
class TCopyLocalDialog : public TForm
|
|
{
|
|
__published:
|
|
TImage *Image;
|
|
TLabel *DirectoryLabel;
|
|
THistoryComboBox *DirectoryEdit;
|
|
TButton *OkButton;
|
|
TButton *CancelButton;
|
|
TButton *LocalDirectoryBrowseButton;
|
|
TButton *HelpButton;
|
|
TCheckBox *NeverShowAgainCheck;
|
|
TPanel *ShortCutHintPanel;
|
|
TLabel *ShortCutHintLabel;
|
|
void __fastcall ShortCutHintLabelClick(TObject *Sender);
|
|
void __fastcall FormShow(TObject *Sender);
|
|
void __fastcall DirectoryEditExit(TObject *Sender);
|
|
void __fastcall FormCloseQuery(TObject *Sender, bool &CanClose);
|
|
void __fastcall HelpButtonClick(TObject *Sender);
|
|
void __fastcall LocalDirectoryBrowseButtonClick(TObject *Sender);
|
|
void __fastcall FormAfterMonitorDpiChanged(TObject *Sender, int OldDPI, int NewDPI);
|
|
|
|
private:
|
|
int FOptions;
|
|
|
|
void UpdateControls();
|
|
void ValidateDirectoryEdit();
|
|
UnicodeString GetDirectory();
|
|
UnicodeString GetFileMask();
|
|
void SetDirectoryAndFileMask(const UnicodeString & Directory, const UnicodeString & FileMask);
|
|
|
|
INTERFACE_HOOK;
|
|
|
|
public:
|
|
TCopyLocalDialog(TComponent * Owner, bool Move, int Options);
|
|
|
|
bool Execute(UnicodeString & TargetDirectory, UnicodeString & FileMask, int & OutputOptions);
|
|
};
|
|
//---------------------------------------------------------------------------
|
|
#endif
|