mirror of
https://github.com/alexkay/spek.git
synced 2025-04-22 03:10:29 +03:00
osx: Fix font size
This commit is contained in:
parent
c7deee63e0
commit
d9d177ecff
@ -128,3 +128,11 @@ gchar *spek_platform_read_line (const gchar *uri) {
|
||||
return line;
|
||||
#endif
|
||||
}
|
||||
|
||||
gdouble spek_platform_get_font_scale () {
|
||||
#ifdef G_OS_DARWIN
|
||||
/* Pango/Quartz fonts are smaller than on X. */
|
||||
return 1.4;
|
||||
#endif
|
||||
return 1.0;
|
||||
}
|
||||
|
@ -33,4 +33,7 @@ void spek_platform_show_uri (const gchar *uri);
|
||||
/* Read a line from a uri */
|
||||
gchar *spek_platform_read_line (const gchar *uri);
|
||||
|
||||
/* Fonts are smaller on OS X */
|
||||
gdouble spek_platform_get_font_scale ();
|
||||
|
||||
#endif
|
||||
|
@ -40,14 +40,9 @@ namespace Spek {
|
||||
private const int BPAD = 40;
|
||||
private const int GAP = 10;
|
||||
private const int RULER = 10;
|
||||
private double FONT_SCALE = 1.0;
|
||||
private double FONT_SCALE = Platform.get_font_scale ();
|
||||
|
||||
public Spectrogram () {
|
||||
#if G_OS_DARWIN
|
||||
// Pango/Quartz fonts are smaller than on X.
|
||||
FONT_SCALE = 1.4;
|
||||
#endif
|
||||
|
||||
// Pre-draw the palette.
|
||||
palette = new ImageSurface (Format.RGB24, RULER, BANDS);
|
||||
for (int y = 0; y < BANDS; y++) {
|
||||
|
@ -4,4 +4,5 @@ namespace Spek.Platform {
|
||||
public static void fix_args (string[] args);
|
||||
public static void show_uri (string uri);
|
||||
public static string read_line (string uri);
|
||||
public static double get_font_scale ();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user