diff --git a/konsole/TEWidget.cpp b/konsole/TEWidget.cpp index b0eb82e1c..2227eb964 100644 --- a/konsole/TEWidget.cpp +++ b/konsole/TEWidget.cpp @@ -424,8 +424,6 @@ TEWidget::TEWidget(QWidget *parent) if (!argb_visual) { - // Looks better at startup with KRootPixmap based pseudo-transparency - setAttribute(Qt::WA_NoBackground); } setAttribute(Qt::WA_PaintOnScreen); //We have our own double-buffer, so... } diff --git a/konsole/konsole.cpp b/konsole/konsole.cpp index 4e372fa56..719c317f2 100644 --- a/konsole/konsole.cpp +++ b/konsole/konsole.cpp @@ -106,7 +106,6 @@ Time to start a requirement list. #include #include #include -#include #include #include #include @@ -1671,16 +1670,9 @@ void Konsole::readProperties(KConfig* config, const QString &schema, bool global if (te) { if (sch->useTransparency()) { - if (!rootxpms[te]) - rootxpms.insert( te, new KRootPixmap(te) ); - rootxpms[te]->setFadeEffect(sch->tr_x(), QColor(sch->tr_r(), sch->tr_g(), sch->tr_b())); } else { - if (rootxpms[te]) { - delete rootxpms[te]; - rootxpms.remove(te); - } pixmap_menu_activated(sch->alignment()); } @@ -1962,11 +1954,6 @@ void Konsole::slotSelectTabbar() { tabwidget->setTabPosition( QTabWidget::Bottom ); } -/* FIXME: Still necessary ? */ - Q3PtrDictIterator it(rootxpms); - for (;it.current();++it) - it.current()->repaint(true); - if (b_fixedSize) { adjustSize(); @@ -2575,8 +2562,6 @@ void Konsole::activateSession(TESession *s) updateSchemaMenu(); } - if (rootxpms[te]) - rootxpms[te]->start(); notifySize(te->Columns(), te->Lines()); // set menu items s->setConnect(true); updateTitle(); @@ -3034,10 +3019,6 @@ void Konsole::doneSession(TESession* s) KToggleAction *ra = session2action.find(s); m_view->removeAction( ra ); tabwidget->removePage( s->widget() ); - if (rootxpms[s->widget()]) { - delete rootxpms[s->widget()]; - rootxpms.remove(s->widget()); - } delete s->widget(); if(m_removeSessionButton ) m_removeSessionButton->setEnabled(tabwidget->count()>1); @@ -3614,9 +3595,6 @@ void Konsole::setSchema(ColorSchema* s, TEWidget* tewidget) if (s->useTransparency()) { if (!argb_visual) { - if (!rootxpms[tewidget]) - rootxpms.insert( tewidget, new KRootPixmap(tewidget) ); - rootxpms[tewidget]->setFadeEffect(s->tr_x(), QColor(s->tr_r(), s->tr_g(), s->tr_b())); } else { tewidget->setBlendColor(qRgba(s->tr_r(), s->tr_g(), s->tr_b(), int(s->tr_x() * 255))); QPalette palette; @@ -3624,10 +3602,6 @@ void Konsole::setSchema(ColorSchema* s, TEWidget* tewidget) tewidget->setPalette( palette ); // make sure any background pixmap is unset } } else { - if (rootxpms[tewidget]) { - delete rootxpms[tewidget]; - rootxpms.remove(tewidget); - } pixmap_menu_activated(s->alignment(), tewidget); tewidget->setBlendColor(qRgba(0, 0, 0, 0xff)); } @@ -3716,10 +3690,6 @@ void Konsole::detachSession(TESession* _se) { m_detachSession->setEnabled(false); tabwidget->removePage( se_widget ); - if (rootxpms[se_widget]) { - delete rootxpms[se_widget]; - rootxpms.remove(se_widget); - } delete se_widget; if (b_dynamicTabHide && tabwidget->count()==1) tabwidget->setTabBarHidden(true); diff --git a/konsole/konsole.h b/konsole/konsole.h index db83cb57f..ba0dbed10 100644 --- a/konsole/konsole.h +++ b/konsole/konsole.h @@ -49,7 +49,6 @@ #define PACKAGE "konsole" #define VERSION "2.0alpha" -class KRootPixmap; class QLabel; class QCheckBox; class KonsoleFind; @@ -298,7 +297,6 @@ private: ColorSchemaList* colors; QString s_encodingName; - Q3PtrDict rootxpms; KWinModule* kWinModule; KMenuBar* menubar; diff --git a/konsole/konsole_part.cpp b/konsole/konsole_part.cpp index d8adf52a5..c39e9fe43 100644 --- a/konsole/konsole_part.cpp +++ b/konsole/konsole_part.cpp @@ -48,7 +48,6 @@ #include #include #include -#include #include #include #include @@ -120,7 +119,6 @@ konsolePart::konsolePart(QWidget *_parentWidget, QObject *parent, const char *cl ,te(0) ,se(0) ,colors(0) -,rootxpm(0) ,blinkingCursor(0) ,showFrame(0) ,m_useKonsoleSettings(0) @@ -580,18 +578,8 @@ void konsolePart::readProperties() te->setColorTable(sch->table()); //FIXME: set twice here to work around a bug if (sch->useTransparency()) { - if (!rootxpm) - rootxpm = new KRootPixmap(te); - rootxpm->setFadeEffect(sch->tr_x(), QColor(sch->tr_r(), sch->tr_g(), sch->tr_b())); - rootxpm->start(); - rootxpm->repaint(true); } else { - if (rootxpm) { - rootxpm->stop(); - delete rootxpm; - rootxpm=0; - } pixmap_menu_activated(sch->alignment()); } @@ -768,18 +756,8 @@ void konsolePart::setSchema(ColorSchema* s) te->setColorTable(s->table()); //FIXME: set twice here to work around a bug if (s->useTransparency()) { - if (!rootxpm) - rootxpm = new KRootPixmap(te); - rootxpm->setFadeEffect(s->tr_x(), QColor(s->tr_r(), s->tr_g(), s->tr_b())); - rootxpm->start(); - rootxpm->repaint(true); } else { - if (rootxpm) { - rootxpm->stop(); - delete rootxpm; - rootxpm=0; - } pixmap_menu_activated(s->alignment()); } diff --git a/konsole/konsole_part.h b/konsole/konsole_part.h index c67d91671..b8b3329d0 100644 --- a/konsole/konsole_part.h +++ b/konsole/konsole_part.h @@ -40,7 +40,6 @@ class QSpinBox; class KMenu; class KActionMenu; class QCheckBox; -class KRootPixmap; class KToggleAction; class KSelectAction; @@ -144,7 +143,6 @@ Q_SIGNALS: TEWidget* te; TESession* se; ColorSchemaList* colors; - KRootPixmap* rootxpm; KActionCollection* actions; KActionCollection* settingsActions; diff --git a/settings/schemaeditor.cpp b/settings/schemaeditor.cpp index 3f58a5fd8..66a5c36e6 100644 --- a/settings/schemaeditor.cpp +++ b/settings/schemaeditor.cpp @@ -27,6 +27,7 @@ #include #include #include +#include //Added by qt3to4: #include #include @@ -42,7 +43,6 @@ #include #include #include -#include #include #include @@ -76,11 +76,6 @@ SchemaEditor::SchemaEditor(QWidget * parent) bold.resize(20); transparent.resize(20); defaultSchema = ""; - spix = new KSharedPixmap; - -#ifdef Q_WS_X11 - connect(spix, SIGNAL(done(bool)), SLOT(previewLoaded(bool))); -#endif QDBusInterface kdesktop("org.kde.kdesktop", "/Background", "org.kde.kdesktop.Background"); kdesktop.call( "setExport", 1 ); @@ -148,7 +143,6 @@ void SchemaEditor::setSchema(QString sch) SchemaEditor::~SchemaEditor() { - delete spix; } @@ -167,10 +161,18 @@ void SchemaEditor::updatePreview() } else //try to reload { -#ifdef Q_WS_X11 - if(!spix->loadFromShared(QString("DESKTOP1"))) - kDebug(0) << "cannot load" << endl; -#endif + QMatrix mat; + QDesktopWidget desktopWidget; + QPixmap pixmap = QPixmap::grabWidget( desktopWidget.screen( 0 ) ); + + pix = pixmap.transformed( mat.scale(180.0 / pixmap.width(), + 100.0 / pixmap.height()) ); + + kDebug(0) << "Loaded" << endl; + loaded = true; + if (transparencyCheck->isChecked()) { + updatePreview(); + } } } else { QPixmap pm; @@ -185,26 +187,6 @@ void SchemaEditor::updatePreview() } -void SchemaEditor::previewLoaded(bool l) -{ - if (l) { - QMatrix mat; - pix = - spix->pixmap().transformed(mat. - scale(180.0 / spix->pixmap().width(), - 100.0 / spix->pixmap().height())); - kDebug(0) << "Loaded" << endl; - loaded = true; - if (transparencyCheck->isChecked()) { - updatePreview(); - } - - } else - kDebug(0) << "error loading" << endl; - -} - - void SchemaEditor::getList() { if (! schemaLoaded) { diff --git a/settings/schemaeditor.h b/settings/schemaeditor.h index f1f65d7a7..723498dc1 100644 --- a/settings/schemaeditor.h +++ b/settings/schemaeditor.h @@ -26,7 +26,6 @@ #include #include #include -class KSharedPixmap; #include "schemadialog.h" @@ -56,7 +55,6 @@ class SchemaEditor : public SchemaDialog void readSchema(int); void saveCurrent(); void removeCurrent(); - void previewLoaded(bool l); void getList(); private Q_SLOTS: void show(); @@ -70,7 +68,6 @@ class SchemaEditor : public SchemaDialog QVector transparent; QVector bold; QPixmap pix; - KSharedPixmap *spix; QString defaultSchema; bool loaded; bool schemaLoaded;