summaryrefslogtreecommitdiff
authorllornkcor <llornkcor>2005-08-09 07:57:17 (UTC)
committer llornkcor <llornkcor>2005-08-09 07:57:17 (UTC)
commit438e79dd18c8b752f1e7d74a79f3cdf84f8703c8 (patch) (unidiff)
treeeb03fa0c989f9ecf138464d1793c28d05b80913c
parent65fefea850384673d282e19ebecd7840cb697354 (diff)
downloadopie-438e79dd18c8b752f1e7d74a79f3cdf84f8703c8.zip
opie-438e79dd18c8b752f1e7d74a79f3cdf84f8703c8.tar.gz
opie-438e79dd18c8b752f1e7d74a79f3cdf84f8703c8.tar.bz2
left align toolbar icons
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/opie-gutenbrowser/gutenbrowserData.cpp27
1 files changed, 15 insertions, 12 deletions
diff --git a/noncore/apps/opie-gutenbrowser/gutenbrowserData.cpp b/noncore/apps/opie-gutenbrowser/gutenbrowserData.cpp
index d384c09..ae1f69c 100644
--- a/noncore/apps/opie-gutenbrowser/gutenbrowserData.cpp
+++ b/noncore/apps/opie-gutenbrowser/gutenbrowserData.cpp
@@ -161,65 +161,67 @@ qDebug("lease query before leaving the library.");;
161 } 161 }
162// bookmarks 162// bookmarks
163// config.setGroup("Titles"); 163// config.setGroup("Titles");
164// QString tmpTitle=config.readEntry(file_name,""); 164// QString tmpTitle=config.readEntry(file_name,"");
165 165
166 166
167}// end initConfig() 167}// end initConfig()
168 168
169#define SCALED Opie::Core::OResource::SmallIcon
170
169void Gutenbrowser::initMenuBar() 171void Gutenbrowser::initMenuBar()
170{ 172{
171 qDebug("Starting menu init."); 173 qDebug("Starting menu init.");
172 // menuBar entry fileMenu 174 // menuBar entry fileMenu
173 menubar = new QPEMenuBar(this); 175 menubar = new QPEMenuBar(this);
174 176
175 fileMenu=new QPopupMenu(); 177 fileMenu=new QPopupMenu();
176 fileMenu->insertItem( Opie::Core::OResource::loadPixmap("gutenbrowser/openbook", Opie::Core::OResource::SmallIcon ), 178 fileMenu->insertItem( Opie::Core::OResource::loadPixmap("gutenbrowser/openbook", SCALED ),
177 "Open Local Library...", this, SLOT( OpenBtn()) ); 179 "Open Local Library...", this, SLOT( OpenBtn()) );
178// fileMenu->insertItem("Download FTPSite", this, SLOT( downloadFtpList()) ); 180// fileMenu->insertItem("Download FTPSite", this, SLOT( downloadFtpList()) );
179 fileMenu->insertItem( Opie::Core::OResource::loadPixmap("home", Opie::Core::OResource::SmallIcon ), 181 fileMenu->insertItem( Opie::Core::OResource::loadPixmap("home", SCALED ),
180 "Download Library Index", this, SLOT( downloadLibIndex()) ); 182 "Download Library Index", this, SLOT( downloadLibIndex()) );
181 fileMenu->insertItem( Opie::Core::OResource::loadPixmap("quit", Opie::Core::OResource::SmallIcon ), 183 fileMenu->insertItem( Opie::Core::OResource::loadPixmap("quit",SCALED),
182 "Quit Gutenbrowser...", this, SLOT( ByeBye()) ); 184 "Quit Gutenbrowser...", this, SLOT( ByeBye()) );
183 // menuBar entry editMenu 185 // menuBar entry editMenu
184 186
185 editMenu=new QPopupMenu(); 187 editMenu=new QPopupMenu();
186 188
187 editMenu->insertItem( Opie::Core::OResource::loadPixmap("up", Opie::Core::OResource::SmallIcon ), "Top", 189 editMenu->insertItem( Opie::Core::OResource::loadPixmap("up", SCALED ), "Top",
188 this, SLOT(TopBtn()) ); 190 this, SLOT(TopBtn()) );
189 editMenu->insertItem( Opie::Core::OResource::loadPixmap("back", Opie::Core::OResource::SmallIcon ), "Beginning", 191 editMenu->insertItem( Opie::Core::OResource::loadPixmap("back",SCALED ), "Beginning",
190 this, SLOT(doBeginBtn()) ); 192 this, SLOT(doBeginBtn()) );
191 editMenu->insertItem( Opie::Core::OResource::loadPixmap("gutenbrowser/search", Opie::Core::OResource::SmallIcon ), "Search", 193 editMenu->insertItem( Opie::Core::OResource::loadPixmap("gutenbrowser/search",SCALED ), "Search",
192 this, SLOT(SearchBtn()) ); 194 this, SLOT(SearchBtn()) );
193 195
194 editMenu->insertItem("Clear", this, SLOT(ClearEdit()) ); 196 editMenu->insertItem("Clear", this, SLOT(ClearEdit()) );
195 197
196 optionsMenu= new QPopupMenu(); 198 optionsMenu= new QPopupMenu();
197 optionsMenu->insertItem( Opie::Core::OResource::loadPixmap("gutenbrowser/configure", Opie::Core::OResource::SmallIcon ), 199 optionsMenu->insertItem( Opie::Core::OResource::loadPixmap("gutenbrowser/configure",SCALED ),
198 "Configure", this, SLOT(doOptions()) ); 200 "Configure", this, SLOT(doOptions()) );
199 201
200 donateMenu = new QPopupMenu(); 202 donateMenu = new QPopupMenu();
201// donateMenu->insertItem("Gutenberg", this, SLOT(donateGutenberg()) ); 203// donateMenu->insertItem("Gutenberg", this, SLOT(donateGutenberg()) );
202 donateMenu->insertItem( Opie::Core::OResource::loadPixmap("gutenbrowser/gutenbrowser_sm", Opie::Core::OResource::SmallIcon ), 204 donateMenu->insertItem( Opie::Core::OResource::loadPixmap("gutenbrowser/gutenbrowser_sm", SCALED ),
203 "Gutenbrowser Developer", this, SLOT(infoGutenbrowser()) ); 205 "Gutenbrowser Developer", this, SLOT(infoGutenbrowser()) );
204 206
205 menubar->insertItem("File", fileMenu); 207 menubar->insertItem("File", fileMenu);
206 menubar->insertItem("Page", editMenu); 208 menubar->insertItem("Page", editMenu);
207 menubar->insertItem("Options", optionsMenu); 209 menubar->insertItem("Options", optionsMenu);
208// menubar->insertItem("More Info", donateMenu); 210// menubar->insertItem("More Info", donateMenu);
209 211
210 menu->addWidget( menubar,0); 212 menu->addWidget( menubar,0);
211 213
212 topLayout->addLayout( menu, 0); 214 topLayout->addLayout( menu, 0);
213} 215}
214 216
215void Gutenbrowser::initButtonBar() 217void Gutenbrowser::initButtonBar()
216{ 218{
217 qDebug("Starting buttonbar init."); 219 //qDebug("Starting buttonbar init.");
218 220
219 OpenButton = new QPushButton( this, "OpenButton" ); 221 OpenButton = new QPushButton( this, "OpenButton" );
220 OpenButton->setFocusPolicy( QWidget::TabFocus ); 222 OpenButton->setFocusPolicy( QWidget::TabFocus );
221 LibraryButton = new QPushButton( this, "LibraryButton" ); 223 LibraryButton = new QPushButton( this, "LibraryButton" );
222 LibraryButton->setFocusPolicy( QWidget::TabFocus ); 224 LibraryButton->setFocusPolicy( QWidget::TabFocus );
223 225
224 BackButton = new QPushButton( this, "BackButton" ); 226 BackButton = new QPushButton( this, "BackButton" );
225 BackButton->setFocusPolicy( QWidget::TabFocus ); 227 BackButton->setFocusPolicy( QWidget::TabFocus );
@@ -244,29 +246,30 @@ void Gutenbrowser::initButtonBar()
244 lastBmkButton->setPopup(bookmarksMenu); 246 lastBmkButton->setPopup(bookmarksMenu);
245 247
246 dictionaryButton = new QPushButton( this, "dictionaryButton" ); 248 dictionaryButton = new QPushButton( this, "dictionaryButton" );
247 dictionaryButton->setFocusPolicy( QWidget::TabFocus ); 249 dictionaryButton->setFocusPolicy( QWidget::TabFocus );
248 250
249 InfoBar = new QPushButton( this, "Info_Bar" ); 251 InfoBar = new QPushButton( this, "Info_Bar" );
250// if(!useSplitter) { 252// if(!useSplitter) {
251 253
252 buttonsHidden=FALSE; 254 buttonsHidden=false;
253 buttons2->setSpacing(2); 255
254 buttons2->addWidget(OpenButton, 0, AlignCenter); 256 buttons2->addWidget(OpenButton, 0, AlignCenter);
255 buttons2->addWidget(LibraryButton, 0, AlignCenter); 257 buttons2->addWidget(LibraryButton, 0, AlignCenter);
256 buttons2->addWidget(BackButton, 0, AlignCenter); 258 buttons2->addWidget(BackButton, 0, AlignCenter);
257 buttons2->addWidget(ForwardButton, 0, AlignCenter); 259 buttons2->addWidget(ForwardButton, 0, AlignCenter);
258 buttons2->addWidget(SearchButton, 0, AlignCenter); 260 buttons2->addWidget(SearchButton, 0, AlignCenter);
259 buttons2->addWidget(setBookmarkButton, 0, AlignCenter); 261 buttons2->addWidget(setBookmarkButton, 0, AlignCenter);
260 buttons2->addWidget(lastBmkButton, 0, AlignCenter); 262 buttons2->addWidget(lastBmkButton, 0, AlignCenter);
261 buttons2->addWidget(dictionaryButton, 0, AlignCenter); 263 buttons2->addWidget(dictionaryButton, 0, AlignCenter);
262 buttons2->addWidget(InfoBar, 0, AlignCenter); 264 buttons2->addWidget(InfoBar, 0, AlignCenter);
265 buttons2->addStretch(5);
266 buttons2->setSpacing(5);
263 267
264 topLayout->setSpacing(0);
265 topLayout->addLayout( buttons2,0); 268 topLayout->addLayout( buttons2,0);
266} 269}
267 270
268/* STATUSBAR*/ 271/* STATUSBAR*/
269void Gutenbrowser::initStatusBar() 272void Gutenbrowser::initStatusBar()
270{ 273{
271 qDebug("statusbar"); 274 qDebug("statusbar");
272// #ifndef Q_WS_QWS 275// #ifndef Q_WS_QWS