Author: gs Date: Wed Nov 14 14:35:16 2007 New Revision: 42056 URL: http://svn.opensuse.org/viewcvs/yast?rev=42056&view=rev Log: layout fixed Modified: branches/tmp/sh/mod-ui/ncurses/src/pkg/NCPkgPopupSearch.cc Modified: branches/tmp/sh/mod-ui/ncurses/src/pkg/NCPkgPopupSearch.cc URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/ncurses/src/pkg/NCPkgPopupSearch.cc?rev=42056&r1=42055&r2=42056&view=diff ============================================================================== --- branches/tmp/sh/mod-ui/ncurses/src/pkg/NCPkgPopupSearch.cc (original) +++ branches/tmp/sh/mod-ui/ncurses/src/pkg/NCPkgPopupSearch.cc Wed Nov 14 14:35:16 2007 @@ -85,98 +85,80 @@ // void NCPkgPopupSearch::createLayout( const string & headline ) { - YWidgetOpt opt; - // vertical split is the (only) child of the dialog NCLayoutBox * vSplit = new NCLayoutBox( this, YD_VERT ); // addChild() is obsolete - //vSplit->addChild( new NCSpacing( vSplit, opt, 0.8, false, true ) ); new NCSpacing( vSplit, YD_VERT, false, 0.8 ); // stretchable = false - //NCLabel * head = new NCLabel( vSplit, opt, headline ); new NCLabel( vSplit, headline, true, false ); // isHeading = true - //vSplit->addChild( new NCSpacing( vSplit, opt, 0.6, false, true ) ); new NCSpacing( vSplit, YD_VERT, false, 0.6 ); - // add the input field (a editable combo box) - opt.isHStretchable.setValue( true ); - - //NCFrame * frame0 = new NCFrame( vSplit, opt, YCPString("" ) ); NCFrame * frame0 = new NCFrame( vSplit, "" ); + // add the input field (a editable combo box) searchExpr = new NCComboBox( frame0, NCPkgNames::SearchPhrase(), true ); // editable = true YStringWidgetID * searchID = new YStringWidgetID ("search_box" ); searchExpr->setId( searchID ); -#if 0 - searchExpr->itemAdded( YCPString( "" ), // set initial value - 0, // index - false ); // not selected -#endif - YItem * item = new YItem( "", false ); // selected = false - searchExpr->addItem( item ); + searchExpr->setStretchable( YD_HORIZ, true ); + + searchExpr->addItem( new YTableItem() ); - //vSplit2->addChild( new NCSpacing( vSplit, opt, 0.6, false, true ) ); new NCSpacing( vSplit, YD_VERT, false, 0.6 ); if ( !packager->isYouMode() ) { // add the checkBox ignore case NCLayoutBox * hSplit2 = new NCLayoutBox( vSplit, YD_HORIZ ); - - ignoreCase = new NCCheckBox( hSplit2, NCPkgNames::IgnoreCase(), true ); // checked = true - //hSplit2->addChild( new NCSpacing( hSplit2, opt, 0.1, true, false ) ); new NCSpacing( hSplit2, YD_HORIZ, true, 0.1 ); - //vSplit->addChild( new NCSpacing( vSplit, opt, 0.6, false, true ) ); // VSpacing + ignoreCase = new NCCheckBox( hSplit2, NCPkgNames::IgnoreCase(), true ); // checked = true new NCSpacing( vSplit, YD_VERT, false, 0.6 ); - // add a frame containing the other check boxes - opt.isHStretchable.setValue( true ); - opt.isVStretchable.setValue( true ); - //NCFrame * frame = new NCFrame( vSplit, opt, YCPString(NCPkgNames::SearchIn()) ); // label of a frame in search popup (without hotkey) NCFrame * frame = new NCFrame( vSplit, _( " Search in " ) ); NCLayoutBox * vSplit3 = new NCLayoutBox( frame, YD_VERT ); - opt.isVStretchable.setValue( false ); checkName = new NCCheckBox( vSplit3, NCPkgNames::CheckName(), true ); + checkName->setStretchable(YD_HORIZ, true ); + checkSummary = new NCCheckBox( vSplit3, NCPkgNames::CheckSummary(), true ); + checkSummary->setStretchable(YD_HORIZ, true ); + checkDescr = new NCCheckBox( vSplit3, NCPkgNames::CheckDescr(), false ); + checkDescr->setStretchable(YD_HORIZ, true ); + checkProvides = new NCCheckBox( vSplit3, NCPkgNames::CheckProvides(), false ); + checkProvides->setStretchable(YD_HORIZ, true ); + checkRequires = new NCCheckBox( vSplit3, NCPkgNames::CheckRequires(), false ); + checkRequires->setStretchable(YD_HORIZ, true ); - //vSplit->addChild( new NCSpacing( vSplit, opt, 0.8, false, true ) ); // VSpacing new NCSpacing( vSplit, YD_VERT, false, 0.8 ); } NCLayoutBox * hSplit3 = new NCLayoutBox( vSplit, YD_HORIZ ); - + + new NCSpacing( hSplit3, YD_HORIZ, true, 0.2 ); + // add the cancel and the ok button - opt.key_Fxx.setValue( 10 ); okButton = new NCPushButton( hSplit3, NCPkgNames::OKLabel() ); YStringWidgetID * okID = new YStringWidgetID("ok"); okButton->setId( okID ); + okButton->setFunctionKey( 10 ); + + new NCSpacing( hSplit3, YD_HORIZ, true, 0.4 ); - opt.key_Fxx.setValue( 9 ); - opt.isVStretchable.setValue( false ); cancelButton = new NCPushButton( hSplit3, NCPkgNames::CancelLabel() ); YStringWidgetID * cancelID = new YStringWidgetID("cancel"); cancelButton->setId( cancelID ); - - opt.isHStretchable.setValue( true ); - //hSplit3->addChild( new NCSpacing( hSplit3, opt, 0.2, true, false ) ); - new NCSpacing( hSplit3, YD_HORIZ, true, 0.2 ); // stretchable = true - - //hSplit3->addChild( new NCSpacing( hSplit3, opt, 0.4, true, false ) ); - new NCSpacing( hSplit3, YD_HORIZ, true, 0.4 ); - - //hSplit3->addChild( new NCSpacing( hSplit3, opt, 0.2, true, false ) ); + cancelButton->setFunctionKey( 9 ); + new NCSpacing( hSplit3, YD_HORIZ, true, 0.2 ); } @@ -226,8 +208,7 @@ i, // index true ); // selected #endif - YItem * item = new YItem( value, true ); //selected = true - searchExpr->addItem( item ); + searchExpr->addItem( value, true ); } return value; -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org