[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    koffice/kexi/plugins/relations
From:       Lucijan Busch <lucijan () kde ! org>
Date:       2003-07-27 11:11:02
[Download RAW message or body]

CVS commit by lucijan: 

don't let relations appear like german tourists...

now it is #ifdef'ed windows/linux what isn't a good just for some gui differences


  M +16 -10    kexirelationviewtable.cpp   1.26


--- koffice/kexi/plugins/relations/kexirelationviewtable.cpp  #1.25:1.26
@@ -55,5 +55,11 @@ KexiRelationViewTableContainer::KexiRela
         setFrameStyle( QFrame::WinPanel | QFrame::Raised );
 
+// sorry but at least under linux it looked like a fat german tourist
+// maybe we should find a better way for different estetic ideas :)
+#ifdef Q_WS_WIN
         QVBoxLayout *lyr = new QVBoxLayout(this,5,1); //js: using Q*BoxLayout is a \
good idea +#else
+        QVBoxLayout *lyr = new QVBoxLayout(this,2,1); //js: using Q*BoxLayout is a \
good idea +#endif
 
         m_tableHeader = new KexiRelationViewTableContainerHeader(table, this);
@@ -74,5 +80,5 @@ KexiRelationViewTableContainer::KexiRela
 }
 
-void KexiRelationViewTableContainer::slotContextMenu(KListView *lv, QListViewItem \
*i, const QPoint& p) +void KexiRelationViewTableContainer::slotContextMenu(KListView \
*, QListViewItem *, const QPoint &p)  {
         m_parent->executePopup(p);
@@ -96,14 +102,14 @@ int KexiRelationViewTableContainer::glob
 QSize KexiRelationViewTableContainer::sizeHint()
 {
+#ifdef Q_WS_WIN
         QSize s = m_tableView->sizeHint()
-                + QSize(  2*5 , m_tableHeader->height() + 2 * 5 );
-//      QSize s = m_tableView->sizeHint()
-//              + QSize(  2 * layout()->margin(), m_tableHeader->height() + 2 * \
layout()->margin() ); +                + QSize(  2 * 5 , m_tableHeader->height() + 2 \
* 5 ); +#else
+        QSize s = m_tableView->sizeHint();
+        s.setWidth(s.width() + 4);
+        s.setHeight(m_tableHeader->height() + s.height());
+#endif
+
         return s;
-/*      return QSize(m_tableView->columnWidth(1) + 2*frameWidth() +2 * \
                layout()->margin(), 
-                (m_tableView->childCount()+1)*m_tableView->firstChild()->totalHeight()
                
-                +m_tableHeader->height()
-                +2*frameWidth() + 2 * layout()->margin() );
-                */
 }
 
@@ -116,5 +122,5 @@ kdDebug() << m_table << " cw=" << column
         QSize s( 
                 QMAX( columnWidth(1) + fm.width("i"), fm.width(m_table+"  ")), 
-                childCount()*firstChild()->totalHeight() + 5 );
+                childCount()*firstChild()->totalHeight() + 4 );
 //      QSize s( columnWidth(1), childCount()*firstChild()->totalHeight() + \
3*firstChild()->totalHeight()/10);  return s;


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic