[uim-commit] r325 - trunk/qt/uim-kdehelper/src/pref
kzk@freedesktop.org
kzk@freedesktop.org
Tue Jan 18 05:03:22 PST 2005
Author: kzk
Date: 2005-01-18 05:03:18 -0800 (Tue, 18 Jan 2005)
New Revision: 325
Modified:
trunk/qt/uim-kdehelper/src/pref/uim-pref-qt.cpp
Log:
* qt/uim-kdehelper/src/pref/uim-pref-qt.cpp
- fix the order of ComboBox
- fix layouting
Modified: trunk/qt/uim-kdehelper/src/pref/uim-pref-qt.cpp
===================================================================
--- trunk/qt/uim-kdehelper/src/pref/uim-pref-qt.cpp 2005-01-18 12:36:07 UTC (rev 324)
+++ trunk/qt/uim-kdehelper/src/pref/uim-pref-qt.cpp 2005-01-18 13:03:18 UTC (rev 325)
@@ -133,16 +133,23 @@
{
char **primary_groups = uim_custom_primary_groups();
char **grp = NULL;
+ QListViewItem *previousItem = NULL;
for( grp = primary_groups; *grp; grp++ )
{
struct uim_custom_group *group = uim_custom_group_get( *grp );
-
- new QListViewItem( m_groupListView, *grp );
+ /* insert item in uim's order */
+ QListViewItem *item = NULL;
+ if( previousItem == NULL )
+ item = new QListViewItem( m_groupListView, *grp );
+ else
+ item = new QListViewItem( m_groupListView, previousItem, *grp );
+
QWidget *w = createGroupWidget( *grp );
m_groupWidgetsDict.insert( *grp, w );
m_groupWidgetStack->addWidget( w );
-
+
+ previousItem = item;
uim_custom_group_free( group );
}
}
@@ -237,6 +244,7 @@
QHBox *hbox = new QHBox( vbox );
hbox->setSpacing( 6 );
QLabel *label = new QLabel( _FU8(custom->label), hbox );
+ hbox->setStretchFactor( new QWidget( hbox ), 1 );
CustomSpinBox *spinBox = new CustomSpinBox( custom, hbox );
spinBox->setValue( custom->value->as_int );
spinBox->setMinValue( custom->range->as_int.min );
@@ -251,7 +259,7 @@
{
QHBox *hbox = new QHBox( vbox );
hbox->setSpacing( 6 );
- QLabel *label = new QLabel( _FU8(custom->label), hbox );
+ QLabel *label = new QLabel( _FU8(custom->label) + ":", hbox );
CustomLineEdit *lineEdit = new CustomLineEdit( custom, hbox );
lineEdit->setText( _FU8(custom->value->as_str) );
label->setBuddy( lineEdit );
More information about the Uim-commit
mailing list