summaryrefslogtreecommitdiff
authorsandman <sandman>2002-10-06 03:07:56 (UTC)
committer sandman <sandman>2002-10-06 03:07:56 (UTC)
commit56276f60d5dd404c3cd8a65003faf75b289f1131 (patch) (unidiff)
treeb531ea59a3dfbb737078d07ef006d417bd5f8698
parent0e67d3b0704e10c1e4676d568caf67d97b604445 (diff)
downloadopie-56276f60d5dd404c3cd8a65003faf75b289f1131.zip
opie-56276f60d5dd404c3cd8a65003faf75b289f1131.tar.gz
opie-56276f60d5dd404c3cd8a65003faf75b289f1131.tar.bz2
- some tweaks to get a better stipple alignment (Qt/E does not understand
X11ParentRelative bg mode) - toolbar separators are not drawn anymore
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/styles/liquid/liquid.cpp18
1 files changed, 15 insertions, 3 deletions
diff --git a/noncore/styles/liquid/liquid.cpp b/noncore/styles/liquid/liquid.cpp
index 1d01c65..259f6af 100644
--- a/noncore/styles/liquid/liquid.cpp
+++ b/noncore/styles/liquid/liquid.cpp
@@ -851,14 +851,13 @@ void LiquidStyle::polish(QWidget *w)
851 851
852 if(w->isTopLevel()){ 852 if(w->isTopLevel()){
853 return; 853 return;
854 } 854 }
855 855
856 856
857 if ( !w-> inherits("QFrame") || (((QFrame*) w)-> frameShape () == QFrame::NoFrame )) 857
858 w-> setBackgroundOrigin ( QWidget::ParentOrigin );
859 858
860 if(w->inherits("QComboBox") || 859 if(w->inherits("QComboBox") ||
861 w->inherits("QLineEdit") || w->inherits("QRadioButton") || 860 w->inherits("QLineEdit") || w->inherits("QRadioButton") ||
862 w->inherits("QCheckBox") || w->inherits("QScrollBar")) { 861 w->inherits("QCheckBox") || w->inherits("QScrollBar")) {
863 w->installEventFilter(this); 862 w->installEventFilter(this);
864 } 863 }
@@ -870,12 +869,13 @@ void LiquidStyle::polish(QWidget *w)
870 if(w->inherits("QPushButton")){ 869 if(w->inherits("QPushButton")){
871 applyCustomAttributes((QPushButton *)w); 870 applyCustomAttributes((QPushButton *)w);
872 w->installEventFilter(this); 871 w->installEventFilter(this);
873 } 872 }
874 if(w->inherits("QButton") || w-> inherits("QComboBox")){ 873 if(w->inherits("QButton") || w-> inherits("QComboBox")){
875 w-> setBackgroundMode ( QWidget::PaletteBackground ); 874 w-> setBackgroundMode ( QWidget::PaletteBackground );
875 w->setBackgroundOrigin ( QWidget::ParentOrigin);
876 } 876 }
877 877
878 bool isViewport = qstrcmp(w->name(), "qt_viewport") == 0 || 878 bool isViewport = qstrcmp(w->name(), "qt_viewport") == 0 ||
879 qstrcmp(w->name(), "qt_clipped_viewport") == 0; 879 qstrcmp(w->name(), "qt_clipped_viewport") == 0;
880 bool isViewportChild = w->parent() && 880 bool isViewportChild = w->parent() &&
881 ((qstrcmp(w->parent()->name(), "qt_viewport") == 0) || 881 ((qstrcmp(w->parent()->name(), "qt_viewport") == 0) ||
@@ -905,12 +905,15 @@ void LiquidStyle::polish(QWidget *w)
905 } 905 }
906 if(w-> inherits("QToolButton")&&w->parent()->inherits("QToolBar")) { 906 if(w-> inherits("QToolButton")&&w->parent()->inherits("QToolBar")) {
907 ((QToolButton*)w)->setAutoRaise (flatTBButtons); 907 ((QToolButton*)w)->setAutoRaise (flatTBButtons);
908 if ( flatTBButtons ) 908 if ( flatTBButtons )
909 w->setBackgroundOrigin(QWidget::ParentOrigin); 909 w->setBackgroundOrigin(QWidget::ParentOrigin);
910 } 910 }
911 if(w-> inherits("QToolBarSeparator")&&w->parent()->inherits("QToolBar")) {
912 ((QFrame *) w)-> setFrameShape ( QFrame::NoFrame );
913 }
911 if(w->ownPalette() && !w->inherits("QButton") && !w->inherits("QComboBox")){ 914 if(w->ownPalette() && !w->inherits("QButton") && !w->inherits("QComboBox")){
912 return; 915 return;
913 } 916 }
914 917
915 if(w->parent() && w->parent()->isWidgetType() && !((QWidget*)w->parent())-> 918 if(w->parent() && w->parent()->isWidgetType() && !((QWidget*)w->parent())->
916 palette().active().brush(QColorGroup::Background).pixmap()){ 919 palette().active().brush(QColorGroup::Background).pixmap()){
@@ -918,16 +921,25 @@ void LiquidStyle::polish(QWidget *w)
918 return; 921 return;
919 } 922 }
920 if(!isViewport && !isViewportChild && !w->testWFlags(WType_Popup) && 923 if(!isViewport && !isViewportChild && !w->testWFlags(WType_Popup) &&
921 !( !w-> inherits("QLineEdit") && w-> parent() && w-> parent()-> isWidgetType ( ) && w-> parent()-> inherits ( "QMultiLineEdit" ))) { 924 !( !w-> inherits("QLineEdit") && w-> parent() && w-> parent()-> isWidgetType ( ) && w-> parent()-> inherits ( "QMultiLineEdit" ))) {
922 if(w->backgroundMode() == QWidget::PaletteBackground || 925 if(w->backgroundMode() == QWidget::PaletteBackground ||
923 w->backgroundMode() == QWidget::PaletteButton){ 926 w->backgroundMode() == QWidget::PaletteButton){
924 w->setBackgroundMode(QWidget::X11ParentRelative); 927 w->setBackgroundMode(w->parentWidget()->backgroundMode( )/*QWidget::X11ParentRelative*/);
928 w->setBackgroundOrigin(QWidget::ParentOrigin);
929 // w->setBackgroundMode(QWidget::NoBackground);
925 } 930 }
926 } 931 }
932 if ( !w-> inherits("QFrame") || (((QFrame*) w)-> frameShape () == QFrame::NoFrame ))
933 w-> setBackgroundOrigin ( QWidget::ParentOrigin );
934 else if ( w-> inherits("QFrame") )
935 w->setBackgroundOrigin ( QWidget::WidgetOrigin );
927 936
937 if ( w->parentWidget()->inherits ( "QWidgetStack" )) {
938 w->setBackgroundOrigin ( QWidget::WidgetOrigin );
939 }
928} 940}
929 941
930void LiquidStyle::unPolish(QWidget *w) 942void LiquidStyle::unPolish(QWidget *w)
931{ 943{
932 if(w->inherits("QMenuBar")){ 944 if(w->inherits("QMenuBar")){
933 ((QFrame *)w)->setLineWidth(1); 945 ((QFrame *)w)->setLineWidth(1);