mirror of
https://github.com/alexkay/spek.git
synced 2025-04-12 23:07:16 +03:00
Add HiDPI support
This commit is contained in:
parent
316be56b66
commit
5a331f5f92
@ -51,7 +51,7 @@ PKG_CHECK_MODULES(AVCODEC, [libavcodec >= 59.37.100])
|
|||||||
PKG_CHECK_MODULES(AVUTIL, [libavutil >= 57.28.100])
|
PKG_CHECK_MODULES(AVUTIL, [libavutil >= 57.28.100])
|
||||||
|
|
||||||
AM_OPTIONS_WXCONFIG
|
AM_OPTIONS_WXCONFIG
|
||||||
reqwx=3.0.0
|
reqwx=3.1.7
|
||||||
AM_PATH_WXCONFIG($reqwx, wx=1)
|
AM_PATH_WXCONFIG($reqwx, wx=1)
|
||||||
if test "$wx" != 1; then
|
if test "$wx" != 1; then
|
||||||
AC_MSG_ERROR([
|
AC_MSG_ERROR([
|
||||||
|
4
dist/osx/Info.plist.in
vendored
4
dist/osx/Info.plist.in
vendored
@ -23,11 +23,11 @@
|
|||||||
<key>CFBundleVersion</key>
|
<key>CFBundleVersion</key>
|
||||||
<string>@VERSION@</string>
|
<string>@VERSION@</string>
|
||||||
<key>NSPrincipalClass</key>
|
<key>NSPrincipalClass</key>
|
||||||
<string>NSApplication</string>
|
<string>wxNSApplication</string>
|
||||||
<key>NSHumanReadableCopyright</key>
|
<key>NSHumanReadableCopyright</key>
|
||||||
<string>Copyright (c) 2010-2013 Alexander Kojevnikov and contributors</string>
|
<string>Copyright (c) 2010-2013 Alexander Kojevnikov and contributors</string>
|
||||||
<key>LSMinimumSystemVersion</key>
|
<key>LSMinimumSystemVersion</key>
|
||||||
<string>10.5</string>
|
<string>10.15</string>
|
||||||
<key>CFBundleDocumentTypes</key>
|
<key>CFBundleDocumentTypes</key>
|
||||||
<array>
|
<array>
|
||||||
<dict>
|
<dict>
|
||||||
|
BIN
dist/win/spek.ico
vendored
BIN
dist/win/spek.ico
vendored
Binary file not shown.
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 401 KiB |
1
dist/win/spek.rc
vendored
1
dist/win/spek.rc
vendored
@ -1,3 +1,4 @@
|
|||||||
|
#define wxUSE_DPI_AWARE_MANIFEST 2
|
||||||
#include <wx/msw/wx.rc>
|
#include <wx/msw/wx.rc>
|
||||||
|
|
||||||
aaaa ICON "spek.ico"
|
aaaa ICON "spek.ico"
|
||||||
|
@ -77,6 +77,10 @@ wxIconBundle SpekArtProvider::CreateIconBundle(const wxArtID& id, const wxArtCli
|
|||||||
bundle.AddIcon(wxIcon("aaaa", wxBITMAP_TYPE_ICO_RESOURCE, 24, 24));
|
bundle.AddIcon(wxIcon("aaaa", wxBITMAP_TYPE_ICO_RESOURCE, 24, 24));
|
||||||
bundle.AddIcon(wxIcon("aaaa", wxBITMAP_TYPE_ICO_RESOURCE, 32, 32));
|
bundle.AddIcon(wxIcon("aaaa", wxBITMAP_TYPE_ICO_RESOURCE, 32, 32));
|
||||||
bundle.AddIcon(wxIcon("aaaa", wxBITMAP_TYPE_ICO_RESOURCE, 48, 48));
|
bundle.AddIcon(wxIcon("aaaa", wxBITMAP_TYPE_ICO_RESOURCE, 48, 48));
|
||||||
|
bundle.AddIcon(wxIcon("aaaa", wxBITMAP_TYPE_ICO_RESOURCE, 64, 64));
|
||||||
|
bundle.AddIcon(wxIcon("aaaa", wxBITMAP_TYPE_ICO_RESOURCE, 96, 96));
|
||||||
|
bundle.AddIcon(wxIcon("aaaa", wxBITMAP_TYPE_ICO_RESOURCE, 128, 128));
|
||||||
|
bundle.AddIcon(wxIcon("aaaa", wxBITMAP_TYPE_ICO_RESOURCE, 256, 256));
|
||||||
return bundle;
|
return bundle;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -27,12 +27,6 @@ enum
|
|||||||
FFT_BITS = 11,
|
FFT_BITS = 11,
|
||||||
MIN_FFT_BITS = 8,
|
MIN_FFT_BITS = 8,
|
||||||
MAX_FFT_BITS = 14,
|
MAX_FFT_BITS = 14,
|
||||||
LPAD = 60,
|
|
||||||
TPAD = 60,
|
|
||||||
RPAD = 90,
|
|
||||||
BPAD = 40,
|
|
||||||
GAP = 10,
|
|
||||||
RULER = 10,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// Forward declarations.
|
// Forward declarations.
|
||||||
@ -60,7 +54,13 @@ SpekSpectrogram::SpekSpectrogram(wxFrame *parent) :
|
|||||||
prev_width(-1),
|
prev_width(-1),
|
||||||
fft_bits(FFT_BITS),
|
fft_bits(FFT_BITS),
|
||||||
urange(URANGE),
|
urange(URANGE),
|
||||||
lrange(LRANGE)
|
lrange(LRANGE),
|
||||||
|
LPAD(this->FromDIP(60)),
|
||||||
|
TPAD(this->FromDIP(60)),
|
||||||
|
RPAD(this->FromDIP(90)),
|
||||||
|
BPAD(this->FromDIP(40)),
|
||||||
|
GAP(this->FromDIP(10)),
|
||||||
|
RULER(this->FromDIP(10))
|
||||||
{
|
{
|
||||||
this->create_palette();
|
this->create_palette();
|
||||||
|
|
||||||
|
@ -51,6 +51,12 @@ private:
|
|||||||
int fft_bits;
|
int fft_bits;
|
||||||
int urange;
|
int urange;
|
||||||
int lrange;
|
int lrange;
|
||||||
|
const int LPAD;
|
||||||
|
const int TPAD;
|
||||||
|
const int RPAD;
|
||||||
|
const int BPAD;
|
||||||
|
const int GAP;
|
||||||
|
const int RULER;
|
||||||
|
|
||||||
DECLARE_EVENT_TABLE()
|
DECLARE_EVENT_TABLE()
|
||||||
};
|
};
|
||||||
|
@ -52,10 +52,11 @@ private:
|
|||||||
};
|
};
|
||||||
|
|
||||||
SpekWindow::SpekWindow(const wxString& path) :
|
SpekWindow::SpekWindow(const wxString& path) :
|
||||||
wxFrame(NULL, -1, wxEmptyString, wxDefaultPosition, wxSize(640, 480)), path(path)
|
wxFrame(NULL, -1, wxEmptyString, wxDefaultPosition, wxDefaultSize), path(path)
|
||||||
{
|
{
|
||||||
this->description = _("Spek - Acoustic Spectrum Analyser");
|
this->description = _("Spek - Acoustic Spectrum Analyser");
|
||||||
SetTitle(this->description);
|
SetTitle(this->description);
|
||||||
|
SetSize(this->FromDIP(wxSize(640, 480)));
|
||||||
|
|
||||||
#ifndef OS_OSX
|
#ifndef OS_OSX
|
||||||
SetIcons(wxArtProvider::GetIconBundle(ART_SPEK, wxART_FRAME_ICON));
|
SetIcons(wxArtProvider::GetIconBundle(ART_SPEK, wxART_FRAME_ICON));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user