From 9e8ab83dca3e093997c65c1f41522f6e8b095805 Mon Sep 17 00:00:00 2001 From: fgerlits Date: Wed, 8 Jun 2005 19:04:05 +0000 Subject: [PATCH] fixed bug #1071 --- .../gLiveSupport/src/MasterPanelWindow.cxx | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/livesupport/products/gLiveSupport/src/MasterPanelWindow.cxx b/livesupport/products/gLiveSupport/src/MasterPanelWindow.cxx index 0c1a2d923..996ad3405 100644 --- a/livesupport/products/gLiveSupport/src/MasterPanelWindow.cxx +++ b/livesupport/products/gLiveSupport/src/MasterPanelWindow.cxx @@ -22,7 +22,7 @@ Author : $Author: fgerlits $ - Version : $Revision: 1.37 $ + Version : $Revision: 1.38 $ Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/gLiveSupport/src/MasterPanelWindow.cxx,v $ ------------------------------------------------------------------------------*/ @@ -37,6 +37,7 @@ #include #include #include +#include #include "LiveSupport/Core/TimeConversion.h" #include "MasterPanelWindow.h" @@ -69,6 +70,18 @@ MasterPanelWindow :: MasterPanelWindow (Ptr::Ref gLiveSupport, // TODO: remove hard-coded station logo path reference radioLogoWidget = Gtk::manage(new Gtk::Image("var/stationLogo.png")); + Glib::RefPtr logo = radioLogoWidget->get_pixbuf(); + int logoWidth = logo->get_width(); + int logoHeight = logo->get_height(); + if (logoWidth * 104 > logoHeight * 120) { + radioLogoWidget->set(logo->scale_simple(120, + (logoHeight * 120)/logoWidth, + Gdk::INTERP_BILINEAR )); + } else { + radioLogoWidget->set(logo->scale_simple((logoWidth * 104)/logoHeight, + 104, + Gdk::INTERP_BILINEAR )); + } radioLogoWidget->set_size_request(120, 104); // set up the layout, which is a button box