┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Penz <[email protected]>2007-02-17 19:24:48 +0000
committerPeter Penz <[email protected]>2007-02-17 19:24:48 +0000
commite4dbe5626b092a884cfda0e99f0f0b4ba5cbc2ef (patch)
tree72bf4d99e998dc565d46589ffff1b1be299d1999
parent383aab8c137410653a7ab0aabc529db575ea0730 (diff)
Some minor polishing: use a grid for the icons view, give the toggle button of the URL navigator an icon
svn path=/trunk/KDE/kdebase/apps/; revision=634601
-rw-r--r--src/dolphiniconsview.cpp2
-rw-r--r--src/urlnavigator.cpp14
-rw-r--r--src/urlnavigator.h4
3 files changed, 14 insertions, 6 deletions
diff --git a/src/dolphiniconsview.cpp b/src/dolphiniconsview.cpp
index 3f9df0316..0f619ff30 100644
--- a/src/dolphiniconsview.cpp
+++ b/src/dolphiniconsview.cpp
@@ -37,7 +37,7 @@ DolphinIconsView::DolphinIconsView(QWidget* parent, DolphinController* controlle
// TODO: read out settings
setViewMode(QListView::IconMode);
- setSpacing(32);
+ setGridSize(QSize(128, 96));
connect(this, SIGNAL(clicked(const QModelIndex&)),
controller, SLOT(triggerItem(const QModelIndex&)));
diff --git a/src/urlnavigator.cpp b/src/urlnavigator.cpp
index aeb10e715..4ce0fc009 100644
--- a/src/urlnavigator.cpp
+++ b/src/urlnavigator.cpp
@@ -30,6 +30,7 @@
#include <assert.h>
#include <kfileitem.h>
+#include <kicon.h>
#include <klocale.h>
#include <kprotocolinfo.h>
#include <kurlcombobox.h>
@@ -37,12 +38,12 @@
#include <QApplication>
#include <QClipboard>
-#include <QCheckBox>
#include <QDir>
#include <QHBoxLayout>
#include <QLabel>
#include <QLineEdit>
#include <QMouseEvent>
+#include <QPushButton>
UrlNavigator::HistoryElem::HistoryElem() :
m_url(),
@@ -82,9 +83,14 @@ UrlNavigator::UrlNavigator(const KUrl& url,
m_history.prepend(HistoryElem(url));
QFontMetrics fontMetrics(font());
- setMinimumHeight(fontMetrics.height() + 8);
+ setMinimumHeight(fontMetrics.height() + 10);
- m_toggleButton = new QCheckBox();
+ // intialize toggle button which switches between the breadcrumb view
+ // and the traditional view
+ m_toggleButton = new QPushButton();
+ m_toggleButton->setCheckable(true);
+ m_toggleButton->setFlat(true);
+ m_toggleButton->setIcon(KIcon("locationbar_erase")); // TODO: is just a placeholder icon
m_toggleButton->setFocusPolicy(Qt::NoFocus);
m_toggleButton->setMinimumHeight(minimumHeight());
connect(m_toggleButton, SIGNAL(clicked()),
@@ -93,10 +99,12 @@ UrlNavigator::UrlNavigator(const KUrl& url,
m_toggleButton->toggle();
}
+ // initialize the bookmark selector
m_bookmarkSelector = new BookmarkSelector(this);
connect(m_bookmarkSelector, SIGNAL(bookmarkActivated(const KUrl&)),
this, SLOT(setUrl(const KUrl&)));
+ // initialize the path box of the traditional view
m_pathBox = new KUrlComboBox(KUrlComboBox::Directories, true, this);
KUrlCompletion* kurlCompletion = new KUrlCompletion(KUrlCompletion::DirCompletion);
diff --git a/src/urlnavigator.h b/src/urlnavigator.h
index 4b571b98d..9482619d6 100644
--- a/src/urlnavigator.h
+++ b/src/urlnavigator.h
@@ -26,11 +26,11 @@
#include <QWidget>
#include <QLinkedList>
-class QCheckBox;
class QHBoxLayout;
class QLabel;
class QLineEdit;
class QMouseEvent;
+class QPushButton;
class KUrl;
class KFileItem;
@@ -294,7 +294,7 @@ private:
QHBoxLayout* m_layout;
QLinkedList<HistoryElem> m_history;
- QCheckBox* m_toggleButton;
+ QPushButton* m_toggleButton;
BookmarkSelector* m_bookmarkSelector;
KUrlComboBox* m_pathBox;
ProtocolCombo* m_protocols;