Drop the TabBox preview as it's ugly and doesn't work correctly. I will add a better solution for 4.6.
svn path=/trunk/KDE/kdebase/workspace/; revision=1137270
This commit is contained in:
parent
5b54bb1d03
commit
265158bb07
2 changed files with 1 additions and 86 deletions
|
@ -20,13 +20,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
// own
|
||||
#include "layoutconfig.h"
|
||||
#include "ui_layoutconfig.h"
|
||||
#include "previewhandlerimpl.h"
|
||||
// tabbox
|
||||
#include "tabboxconfig.h"
|
||||
#include "tabboxhandler.h"
|
||||
#include "tabboxview.h"
|
||||
// Qt
|
||||
#include <QVBoxLayout>
|
||||
|
||||
namespace KWin
|
||||
{
|
||||
|
@ -40,17 +35,14 @@ class LayoutConfigPrivate
|
|||
{
|
||||
public:
|
||||
LayoutConfigPrivate();
|
||||
~LayoutConfigPrivate() { delete previewTabbox; }
|
||||
~LayoutConfigPrivate() { }
|
||||
|
||||
TabBoxConfig config;
|
||||
Ui::LayoutConfigForm ui;
|
||||
PreviewHandlerImpl* previewTabbox;
|
||||
};
|
||||
|
||||
LayoutConfigPrivate::LayoutConfigPrivate()
|
||||
: previewTabbox( new PreviewHandlerImpl() )
|
||||
{
|
||||
previewTabbox->setConfig( config );
|
||||
}
|
||||
|
||||
/***************************************************
|
||||
|
@ -61,13 +53,6 @@ LayoutConfig::LayoutConfig(QWidget* parent)
|
|||
{
|
||||
d = new LayoutConfigPrivate;
|
||||
d->ui.setupUi( this );
|
||||
QVBoxLayout* layout = new QVBoxLayout;
|
||||
QWidget* tabBoxView = tabBox->tabBoxView();
|
||||
tabBoxView->setSizePolicy( QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding );
|
||||
layout->addWidget( tabBoxView );
|
||||
d->ui.previewWidget->setLayout( layout );
|
||||
tabBox->createModel();
|
||||
tabBox->setCurrentIndex( tabBox->first() );
|
||||
|
||||
// init the item layout combo box
|
||||
d->ui.itemLayoutCombo->addItem( i18n("Informative") );
|
||||
|
@ -107,7 +92,6 @@ TabBoxConfig& LayoutConfig::config() const
|
|||
void LayoutConfig::setConfig( const KWin::TabBox::TabBoxConfig& config )
|
||||
{
|
||||
d->config = config;
|
||||
tabBox->setConfig( config );
|
||||
d->ui.selectedItemBox->setChecked( config.selectedItemViewPosition() != TabBoxConfig::NonePosition );
|
||||
|
||||
d->ui.layoutCombo->setCurrentIndex( config.layout() );
|
||||
|
@ -232,10 +216,6 @@ void LayoutConfig::changed()
|
|||
{
|
||||
d->config.setSelectedItemViewPosition( TabBoxConfig::NonePosition );
|
||||
}
|
||||
// update the preview
|
||||
tabBox->setConfig( d->config );
|
||||
d->ui.previewWidget->layout()->invalidate();
|
||||
d->ui.previewWidget->update();
|
||||
}
|
||||
|
||||
} // namespace KWin
|
||||
|
|
|
@ -233,71 +233,6 @@
|
|||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0" colspan="2">
|
||||
<widget class="QScrollArea" name="scrollArea">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>400</width>
|
||||
<height>200</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::NoFrame</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Plain</enum>
|
||||
</property>
|
||||
<property name="verticalScrollBarPolicy">
|
||||
<enum>Qt::ScrollBarAlwaysOff</enum>
|
||||
</property>
|
||||
<property name="horizontalScrollBarPolicy">
|
||||
<enum>Qt::ScrollBarAlwaysOff</enum>
|
||||
</property>
|
||||
<property name="widgetResizable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<widget class="QWidget" name="scrollAreaWidgetContents">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>672</width>
|
||||
<height>200</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>400</width>
|
||||
<height>200</height>
|
||||
</size>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="QWidget" name="previewWidget" native="true">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
|
|
Loading…
Reference in a new issue