From aae5e8288f08f82c055af6f400dadc78d34ea5c9 Mon Sep 17 00:00:00 2001 From: maroy Date: Fri, 18 Feb 2005 15:13:33 +0000 Subject: [PATCH] made master panel full screen width --- .../src/MasterPanelUserInfoWidget.cxx | 10 ++- .../gLiveSupport/src/MasterPanelWindow.cxx | 66 ++++++++++++++---- .../var/widgets/blueBin/topLeft.png | Bin 2844 -> 2830 bytes 3 files changed, 60 insertions(+), 16 deletions(-) diff --git a/livesupport/products/gLiveSupport/src/MasterPanelUserInfoWidget.cxx b/livesupport/products/gLiveSupport/src/MasterPanelUserInfoWidget.cxx index 8ff6f18e1..11565ad01 100644 --- a/livesupport/products/gLiveSupport/src/MasterPanelUserInfoWidget.cxx +++ b/livesupport/products/gLiveSupport/src/MasterPanelUserInfoWidget.cxx @@ -22,7 +22,7 @@ Author : $Author: maroy $ - Version : $Revision: 1.5 $ + Version : $Revision: 1.6 $ Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/gLiveSupport/src/MasterPanelUserInfoWidget.cxx,v $ ------------------------------------------------------------------------------*/ @@ -80,8 +80,12 @@ MasterPanelUserInfoWidget :: MasterPanelUserInfoWidget ( changeLanguage(bundle); // set up the main window, and show everything - attach(*logInOutButton, 0, 1, 0, 1); - attach(*userInfoLabel, 1, 2, 0, 1); + attach(*logInOutButton, 0, 1, 0, 1, + Gtk::SHRINK|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, + 5, 0); + attach(*userInfoLabel, 1, 2, 0, 1, + Gtk::SHRINK|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, + 5, 0); // show everything show_all(); diff --git a/livesupport/products/gLiveSupport/src/MasterPanelWindow.cxx b/livesupport/products/gLiveSupport/src/MasterPanelWindow.cxx index 2237b536a..41dfccecc 100644 --- a/livesupport/products/gLiveSupport/src/MasterPanelWindow.cxx +++ b/livesupport/products/gLiveSupport/src/MasterPanelWindow.cxx @@ -22,7 +22,7 @@ Author : $Author: maroy $ - Version : $Revision: 1.11 $ + Version : $Revision: 1.12 $ Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/gLiveSupport/src/MasterPanelWindow.cxx,v $ ------------------------------------------------------------------------------*/ @@ -72,6 +72,7 @@ MasterPanelWindow :: MasterPanelWindow (Ptr::Ref gLiveSupport, // TODO: remove hard-coded station logo path reference radioLogoWidget = Gtk::manage(new Gtk::Image("var/stationLogo.png")); + radioLogoWidget->set_size_request(158, 104); // set up the layout, which is a button box layout = Gtk::manage(new Gtk::Table()); @@ -80,24 +81,29 @@ MasterPanelWindow :: MasterPanelWindow (Ptr::Ref gLiveSupport, timeWidget = Gtk::manage(new Gtk::Label("time")); timeBin = Gtk::manage(widgetFactory->createBlueBin()); timeBin->add(*timeWidget); + timeBin->set_size_request(153, 104); // set up the now playing widget nowPlayingWidget = Gtk::manage(new Gtk::Label("now playing")); nowPlayingBin = Gtk::manage(widgetFactory->createDarkBlueBin()); nowPlayingBin->add(*nowPlayingWidget); + timeBin->set_size_request(-1, 104); // set up the VU meter widget vuMeterWidget = Gtk::manage(new Gtk::Label("VU meter")); vuMeterBin = Gtk::manage(widgetFactory->createBlueBin()); vuMeterBin->add(*vuMeterWidget); + vuMeterBin->set_size_request(400, 40); // set up the next playing widget nextPlayingWidget = Gtk::manage(new Gtk::Label("next playing")); nextPlayingBin = Gtk::manage(widgetFactory->createBlueBin()); nextPlayingBin->add(*nextPlayingWidget); + nextPlayingBin->set_size_request(400, 59); // create the bottom bar bottomBar = Gtk::manage(new Gtk::Table()); + bottomBar->set_size_request(-1, 30); buttonBar = Gtk::manage(new Gtk::Table()); buttonBarAlignment = Gtk::manage(new Gtk::Alignment(Gtk::ALIGN_LEFT, Gtk::ALIGN_CENTER, @@ -109,18 +115,34 @@ MasterPanelWindow :: MasterPanelWindow (Ptr::Ref gLiveSupport, Gtk::ALIGN_CENTER, 0, 0)); userInfoAlignment->add(*userInfoWidget); - bottomBar->attach(*buttonBarAlignment, 0, 1, 0, 1); - bottomBar->attach(*userInfoAlignment, 1, 2, 0, 1); + bottomBar->attach(*buttonBarAlignment, 0, 1, 0, 1, + Gtk::EXPAND|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, + 5, 0); + bottomBar->attach(*userInfoAlignment, 1, 2, 0, 1, + Gtk::SHRINK|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, + 5, 0); // set up the main window, and show everything // all the localized widgets were set up in changeLanguage() set_border_width(10); - layout->attach(*timeBin, 0, 1, 0, 2); - layout->attach(*nowPlayingBin, 1, 2, 0, 2); - layout->attach(*vuMeterBin, 2, 3, 0, 1); - layout->attach(*nextPlayingBin, 2, 3, 1, 2); - layout->attach(*radioLogoWidget, 3, 4, 0, 2); - layout->attach(*bottomBar, 0, 4, 2, 3); + layout->attach(*timeBin, 0, 1, 0, 2, + Gtk::SHRINK|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, + 0, 0); + layout->attach(*nowPlayingBin, 1, 2, 0, 2, + Gtk::EXPAND|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, + 5, 0); + layout->attach(*vuMeterBin, 2, 3, 0, 1, + Gtk::SHRINK|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, + 0, 0); + layout->attach(*nextPlayingBin, 2, 3, 1, 2, + Gtk::SHRINK|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, + 0, 0); + layout->attach(*radioLogoWidget, 3, 4, 0, 2, + Gtk::SHRINK|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, + 5, 0); + layout->attach(*bottomBar, 0, 4, 2, 3, + Gtk::EXPAND|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, + 0, 0); add(*layout); @@ -131,6 +153,16 @@ MasterPanelWindow :: MasterPanelWindow (Ptr::Ref gLiveSupport, colormap->alloc_color(bgColor); modify_bg(Gtk::STATE_NORMAL, bgColor); + // set the size and location of the window, according to the screen size + Glib::RefPtr screen = get_screen(); + int width; + int height; + get_size(width, height); + width = screen->get_width(); + set_default_size(width, height); + move(0, 0); + set_decorated(false); + // set the localized resources changeLanguage(bundle); @@ -180,10 +212,18 @@ MasterPanelWindow :: changeLanguage(Ptr::Ref bundle) userInfoWidget->changeLanguage(bundle); // re-attach the localized widgets to the layout - buttonBar->attach(*uploadFileButton, 0, 1, 0, 1); - buttonBar->attach(*djBagButton, 1, 2, 0, 1); - buttonBar->attach(*simplePlaylistMgmtButton, 2, 3, 0, 1); - buttonBar->attach(*schedulerButton, 3, 4, 0, 1); + buttonBar->attach(*uploadFileButton, 0, 1, 0, 1, + Gtk::SHRINK|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, + 5, 0); + buttonBar->attach(*djBagButton, 1, 2, 0, 1, + Gtk::SHRINK|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, + 5, 0); + buttonBar->attach(*simplePlaylistMgmtButton, 2, 3, 0, 1, + Gtk::SHRINK|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, + 5, 0); + buttonBar->attach(*schedulerButton, 3, 4, 0, 1, + Gtk::SHRINK|Gtk::FILL, Gtk::SHRINK|Gtk::FILL, + 5, 0); // re-bind events to the buttons uploadFileButton->signal_clicked().connect(sigc::mem_fun(*this, diff --git a/livesupport/products/gLiveSupport/var/widgets/blueBin/topLeft.png b/livesupport/products/gLiveSupport/var/widgets/blueBin/topLeft.png index afeb10f9463e75ad41ea0118bc3b8f7aca895c16..6fb4deb28dcc4e2aec692ccd143f527d0ab66116 100644 GIT binary patch delta 107 zcmbOu)+eUe8Q|y6%O%Cdz`(%k>ERLtq?tjOg9%99^iq1UQE@GogSMxOV@Sm<204a@ z{~3S%{{7|aw{PEnFuwcn@ye}xPhY%Z`SR`i!>2EERLtq**|ig9%8gP3F|xsJNEP&(hPyF{I*_$-#qM z3<3hI2bTZ&e_ivb0$+4d-0rR_zceP#n#LzP!>7-D&*3nAX;A7J4u`Y5d+t2pWjOy@ Vo|Cg_sXfp%22WQ%mvv4FO#lP^C!7EP