summaryrefslogtreecommitdiff
authorllornkcor <llornkcor>2005-08-09 07:57:17 (UTC)
committer llornkcor <llornkcor>2005-08-09 07:57:17 (UTC)
commit438e79dd18c8b752f1e7d74a79f3cdf84f8703c8 (patch) (side-by-side diff)
treeeb03fa0c989f9ecf138464d1793c28d05b80913c
parent65fefea850384673d282e19ebecd7840cb697354 (diff)
downloadopie-438e79dd18c8b752f1e7d74a79f3cdf84f8703c8.zip
opie-438e79dd18c8b752f1e7d74a79f3cdf84f8703c8.tar.gz
opie-438e79dd18c8b752f1e7d74a79f3cdf84f8703c8.tar.bz2
left align toolbar icons
Diffstat (more/less context) (show 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
@@ -145,144 +145,147 @@ void Gutenbrowser::initConfig() {
ftp_base_dir= config.readEntry("base", "/pub/gutenberg");
//bool ok2;
QString temp;
QString copying;
copying="";
config.setGroup("General");
QString qExit;
qExit=config.readEntry("queryExit","TRUE");
if(qExit=="TRUE") {
b_queryExit=TRUE;
qDebug("lease query before leaving the library.");;
} else {
qDebug("Please DO NOT query before leaving the library.");
b_queryExit=FALSE;
}
// bookmarks
// config.setGroup("Titles");
// QString tmpTitle=config.readEntry(file_name,"");
}// end initConfig()
+#define SCALED Opie::Core::OResource::SmallIcon
+
void Gutenbrowser::initMenuBar()
{
qDebug("Starting menu init.");
// menuBar entry fileMenu
menubar = new QPEMenuBar(this);
fileMenu=new QPopupMenu();
- fileMenu->insertItem( Opie::Core::OResource::loadPixmap("gutenbrowser/openbook", Opie::Core::OResource::SmallIcon ),
+ fileMenu->insertItem( Opie::Core::OResource::loadPixmap("gutenbrowser/openbook", SCALED ),
"Open Local Library...", this, SLOT( OpenBtn()) );
// fileMenu->insertItem("Download FTPSite", this, SLOT( downloadFtpList()) );
- fileMenu->insertItem( Opie::Core::OResource::loadPixmap("home", Opie::Core::OResource::SmallIcon ),
+ fileMenu->insertItem( Opie::Core::OResource::loadPixmap("home", SCALED ),
"Download Library Index", this, SLOT( downloadLibIndex()) );
- fileMenu->insertItem( Opie::Core::OResource::loadPixmap("quit", Opie::Core::OResource::SmallIcon ),
+ fileMenu->insertItem( Opie::Core::OResource::loadPixmap("quit",SCALED),
"Quit Gutenbrowser...", this, SLOT( ByeBye()) );
// menuBar entry editMenu
editMenu=new QPopupMenu();
- editMenu->insertItem( Opie::Core::OResource::loadPixmap("up", Opie::Core::OResource::SmallIcon ), "Top",
+ editMenu->insertItem( Opie::Core::OResource::loadPixmap("up", SCALED ), "Top",
this, SLOT(TopBtn()) );
- editMenu->insertItem( Opie::Core::OResource::loadPixmap("back", Opie::Core::OResource::SmallIcon ), "Beginning",
+ editMenu->insertItem( Opie::Core::OResource::loadPixmap("back",SCALED ), "Beginning",
this, SLOT(doBeginBtn()) );
- editMenu->insertItem( Opie::Core::OResource::loadPixmap("gutenbrowser/search", Opie::Core::OResource::SmallIcon ), "Search",
+ editMenu->insertItem( Opie::Core::OResource::loadPixmap("gutenbrowser/search",SCALED ), "Search",
this, SLOT(SearchBtn()) );
editMenu->insertItem("Clear", this, SLOT(ClearEdit()) );
optionsMenu= new QPopupMenu();
- optionsMenu->insertItem( Opie::Core::OResource::loadPixmap("gutenbrowser/configure", Opie::Core::OResource::SmallIcon ),
+ optionsMenu->insertItem( Opie::Core::OResource::loadPixmap("gutenbrowser/configure",SCALED ),
"Configure", this, SLOT(doOptions()) );
donateMenu = new QPopupMenu();
// donateMenu->insertItem("Gutenberg", this, SLOT(donateGutenberg()) );
- donateMenu->insertItem( Opie::Core::OResource::loadPixmap("gutenbrowser/gutenbrowser_sm", Opie::Core::OResource::SmallIcon ),
+ donateMenu->insertItem( Opie::Core::OResource::loadPixmap("gutenbrowser/gutenbrowser_sm", SCALED ),
"Gutenbrowser Developer", this, SLOT(infoGutenbrowser()) );
menubar->insertItem("File", fileMenu);
menubar->insertItem("Page", editMenu);
menubar->insertItem("Options", optionsMenu);
// menubar->insertItem("More Info", donateMenu);
menu->addWidget( menubar,0);
topLayout->addLayout( menu, 0);
}
void Gutenbrowser::initButtonBar()
{
- qDebug("Starting buttonbar init.");
+// qDebug("Starting buttonbar init.");
OpenButton = new QPushButton( this, "OpenButton" );
OpenButton->setFocusPolicy( QWidget::TabFocus );
LibraryButton = new QPushButton( this, "LibraryButton" );
LibraryButton->setFocusPolicy( QWidget::TabFocus );
BackButton = new QPushButton( this, "BackButton" );
BackButton->setFocusPolicy( QWidget::TabFocus );
BackButton->setAutoRepeat(TRUE);
ForwardButton = new QPushButton( this, "ForwardButton" );
ForwardButton->setFocusPolicy( QWidget::TabFocus );
// ForwardButton->setAutoRepeat(TRUE);
SearchButton = new QPushButton( this, "SearchButton" );
SearchButton->setFocusPolicy( QWidget::TabFocus );
setBookmarkButton = new QPushButton( this, "setBookmark" );
setBookmarkButton->setFocusPolicy( QWidget::TabFocus );
lastBmkButton = new MenuButton( this, "lastBmkButton" );
lastBmkButton->setFocusPolicy( QWidget::TabFocus );
bookmarksMenu = new QPopupMenu();
bookmarksMenu->insertItem("Last Set", this, SLOT(Bookmark( int) ));
lastBmkButton->setPopup(bookmarksMenu);
dictionaryButton = new QPushButton( this, "dictionaryButton" );
dictionaryButton->setFocusPolicy( QWidget::TabFocus );
InfoBar = new QPushButton( this, "Info_Bar" );
// if(!useSplitter) {
- buttonsHidden=FALSE;
- buttons2->setSpacing(2);
+ buttonsHidden=false;
+
buttons2->addWidget(OpenButton, 0, AlignCenter);
buttons2->addWidget(LibraryButton, 0, AlignCenter);
buttons2->addWidget(BackButton, 0, AlignCenter);
buttons2->addWidget(ForwardButton, 0, AlignCenter);
buttons2->addWidget(SearchButton, 0, AlignCenter);
buttons2->addWidget(setBookmarkButton, 0, AlignCenter);
buttons2->addWidget(lastBmkButton, 0, AlignCenter);
buttons2->addWidget(dictionaryButton, 0, AlignCenter);
buttons2->addWidget(InfoBar, 0, AlignCenter);
+ buttons2->addStretch(5);
+ buttons2->setSpacing(5);
- topLayout->setSpacing(0);
topLayout->addLayout( buttons2,0);
}
/* STATUSBAR*/
void Gutenbrowser::initStatusBar()
{
qDebug("statusbar");
// #ifndef Q_WS_QWS
// statusBar = new QStatusBar( this, "Status Bar");
// statusBar->message(IDS_STATUS_DEFAULT, 2000);
// #endif
}
void Gutenbrowser::initView()
{
// set the main widget here
// QFont defaultFont( "charter", 10, 50, 0 );
Lview = new MultiLine_Ex(this);
Config cfg("Gutenbrowser");
cfg.setGroup("Font");
FontDatabase fdb;
QFont defaultFont = Lview->font();