From: Eric Wertz Date: Mon, 20 Feb 2017 16:32:10 +0000 (-0500) Subject: Fixed bug where scaling wasn't looking right X-Git-Url: https://ericdwertz.com/git/?a=commitdiff_plain;h=ab53147dd86867c5bde2c0445cb6abf7d21fff05;p=ericdesktop.git Fixed bug where scaling wasn't looking right --- diff --git a/main.c b/main.c index ea7afc2..6f7d65f 100644 --- a/main.c +++ b/main.c @@ -8,6 +8,7 @@ #include #include +#include #include GtkWidget* window; @@ -134,7 +135,7 @@ void load_wallpaper_pixels(GdkPixbuf* pixbuf) float sw, sh; float targetheight = (float)width / aspect; float targetwidth = (float)height * aspect; - if( targetwidth >= screen_width ) + if( targetwidth >= screen_width && targetwidth <= height ) { //Scale width, crop height tx1 = 0.0f; @@ -378,7 +379,27 @@ int main( int argc, char* argv[] ) GSettingsSchema* gsettings_schema; gsettings_schema = g_settings_schema_source_lookup( g_settings_schema_source_get_default(), - "org.gnome.desktop.background", + + + + + + + + + + + + + + + + + + + + + "org.gnome.desktop.background", TRUE ); if( gsettings_schema ) {