summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2005-04-01 13:07:01 (UTC)
committer zautrix <zautrix>2005-04-01 13:07:01 (UTC)
commit93003b1f8348f112648d3cc20acb21b062220e21 (patch) (side-by-side diff)
tree901bebe154a15f05296158db5da3689b849e8281
parentf8e027db1d950ec27a3c47fc2a5ea2fe49ae9772 (diff)
downloadkdepimpi-93003b1f8348f112648d3cc20acb21b062220e21.zip
kdepimpi-93003b1f8348f112648d3cc20acb21b062220e21.tar.gz
kdepimpi-93003b1f8348f112648d3cc20acb21b062220e21.tar.bz2
fixes
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/kolistview.cpp2
-rw-r--r--microkde/KDGanttMinimizeSplitter.cpp32
-rw-r--r--microkde/KDGanttMinimizeSplitter.h2
3 files changed, 34 insertions, 2 deletions
diff --git a/korganizer/kolistview.cpp b/korganizer/kolistview.cpp
index 09d70f1..15e094d 100644
--- a/korganizer/kolistview.cpp
+++ b/korganizer/kolistview.cpp
@@ -1217,3 +1217,3 @@ void KOListViewListView::contentsMousePressEvent(QMouseEvent *e)
QListViewItem* ci = currentItem();
- clearSelection();
+ //clearSelection();
if ( ci )
diff --git a/microkde/KDGanttMinimizeSplitter.cpp b/microkde/KDGanttMinimizeSplitter.cpp
index 029f14b..ea3a329 100644
--- a/microkde/KDGanttMinimizeSplitter.cpp
+++ b/microkde/KDGanttMinimizeSplitter.cpp
@@ -191,2 +191,4 @@ void KDGanttSplitterHandle::mouseReleaseEvent( QMouseEvent *e )
}
+ if ( s->rubberBand() )
+ s->rubberBand()->hide();
repaint();
@@ -436,3 +438,2 @@ static QSize minSizeHint( const QWidget* w )
-
/*!
@@ -444,2 +445,3 @@ KDGanttMinimizeSplitter::KDGanttMinimizeSplitter( QWidget *parent, const char *n
{
+ mRubberBand = 0;
mFirstHandle = 0;
@@ -458,2 +460,4 @@ KDGanttMinimizeSplitter::KDGanttMinimizeSplitter( Orientation o, QWidget *parent
{
+
+ mRubberBand = 0;
mFirstHandle = 0;
@@ -474,2 +478,4 @@ KDGanttMinimizeSplitter::~KDGanttMinimizeSplitter()
#endif
+ if ( mRubberBand )
+ delete mRubberBand;
}
@@ -644,2 +650,3 @@ void KDGanttMinimizeSplitter::setRubberband( int p )
{
+#ifdef DESKTOP_VERSION
QPainter paint( this );
@@ -669,2 +676,25 @@ void KDGanttMinimizeSplitter::setRubberband( int p )
opaqueOldPos = p;
+#else
+ if ( !mRubberBand ) {
+ mRubberBand = new QFrame( 0, "rubber", WStyle_NoBorder | WStyle_Customize | WStyle_StaysOnTop);
+ mRubberBand->setFrameStyle( Box | Raised );
+ mRubberBand->setPalette( QPalette ( Qt::green.light(),Qt::green.dark() ) );
+ }
+ QRect r = contentsRect();
+ const int rBord = 5; //Themable????
+ int sw = style().splitterWidth();
+ if ( orient == Horizontal ) {
+ if ( p >= 0 ) {
+ QPoint geo = mapToGlobal (QPoint ( p + sw/2 - rBord, r.y()));
+ mRubberBand->setGeometry( geo.x(), geo.y(), 2*rBord, r.height() );
+ }
+ } else {
+ if ( p >= 0 ) {
+ QPoint geo = mapToGlobal (QPoint ( r.x(), p + sw/2 - rBord));
+ mRubberBand->setGeometry( geo.x(), geo.y(), r.width(), 2*rBord);
+ }
+ }
+ opaqueOldPos = p;
+ mRubberBand->show();
+#endif
}
diff --git a/microkde/KDGanttMinimizeSplitter.h b/microkde/KDGanttMinimizeSplitter.h
index 84d3d8e..585298d 100644
--- a/microkde/KDGanttMinimizeSplitter.h
+++ b/microkde/KDGanttMinimizeSplitter.h
@@ -82,2 +82,3 @@ public:
void expandPos( int id, int* min, int* max );
+ QFrame* rubberBand() { return mRubberBand ;}
public slots:
@@ -101,2 +102,3 @@ protected:
private:
+ QFrame* mRubberBand;
void init();