Ticket #39: 0001-bug-39-scale-down-for-small-displays.patch

File 0001-bug-39-scale-down-for-small-displays.patch, 839 bytes (added by homunq, 12 years ago)

patch to sugar - scale down to 72 if w<900 or h<700

  • bin/sugar.in

    From fff51c534e3738a1fa86a8dc3be0cc15956f5b08 Mon Sep 17 00:00:00 2001
    From: chema <chema@chema-laptop.(none)>
    Date: Tue, 17 Mar 2009 08:33:37 -0600
    Subject: [PATCH] bug #39: scale down for small displays
    
    ---
     bin/sugar.in |    7 ++++++-
     1 files changed, 6 insertions(+), 1 deletions(-)
    
    diff --git a/bin/sugar.in b/bin/sugar.in
    index b9f467c..00424e1 100644
    a b  
    11#!/bin/sh
    22
    33if test -z "$SUGAR_SCALING"; then
    4     export SUGAR_SCALING=100
     4        res=( $( xdpyinfo | sed -n -e '/dimensions:/s/.*[[:space:]]\([[:digit:]]\+\)x\([[:digit:]]\+\).*/\1 \2/p' ) )
     5        if [ ${res[0]} -lt 900 ] || [ ${res[1]} -lt 700 ]; then
     6        export SUGAR_SCALING=72
     7    else
     8        export SUGAR_SCALING=100
     9    fi
    510fi
    611
    712export GTK2_RC_FILES="@prefix@/share/sugar/data/sugar-$SUGAR_SCALING.gtkrc"