mirror of
https://github.com/SpartanJ/eepp.git
synced 2026-08-18 06:55:48 +03:00
A couple of minor fixes.
This commit is contained in:
@@ -138,17 +138,15 @@ void UIDropDownList::showList() {
|
||||
|
||||
Float sliderValue = mListBox->getVerticalScrollBar()->getValue();
|
||||
|
||||
if ( mStyleConfig.MaxNumVisibleItems < mListBox->getCount() ) {
|
||||
mListBox->setSize(
|
||||
NULL != mFriendNode ? mFriendNode->getSize().getWidth() : getSize().getWidth(),
|
||||
(Int32)( mStyleConfig.MaxNumVisibleItems * mListBox->getRowHeight() ) +
|
||||
tPadding.Top + tPadding.Bottom );
|
||||
} else {
|
||||
mListBox->setSize( NULL != mFriendNode ? mFriendNode->getSize().getWidth()
|
||||
: getSize().getWidth(),
|
||||
(Int32)( mListBox->getCount() * mListBox->getRowHeight() ) +
|
||||
tPadding.Top + tPadding.Bottom );
|
||||
}
|
||||
mListBox->setSize(
|
||||
NULL != mFriendNode ? mFriendNode->getSize().getWidth() : getSize().getWidth(),
|
||||
(Int32)( std::min( mListBox->getCount(), mStyleConfig.MaxNumVisibleItems ) *
|
||||
mListBox->getRowHeight() ) +
|
||||
tPadding.Top + tPadding.Bottom +
|
||||
( mListBox->getHorizontalScrollBar() &&
|
||||
mListBox->getHorizontalScrollBar()->isVisible()
|
||||
? mListBox->getHorizontalScrollBar()->getSize().getHeight()
|
||||
: 0.f ) );
|
||||
|
||||
mListBox->getVerticalScrollBar()->setValue( sliderValue );
|
||||
|
||||
@@ -208,8 +206,9 @@ void UIDropDownList::setMaxNumVisibleItems( const Uint32& maxNumVisibleItems ) {
|
||||
mStyleConfig.MaxNumVisibleItems = maxNumVisibleItems;
|
||||
|
||||
if ( NULL != mListBox )
|
||||
mListBox->setSize( getSize().getWidth(),
|
||||
mStyleConfig.MaxNumVisibleItems * mListBox->getRowHeight() );
|
||||
mListBox->setSize( getSize().getWidth(), std::min( mStyleConfig.MaxNumVisibleItems,
|
||||
getListBox()->getCount() ) *
|
||||
mListBox->getRowHeight() );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -127,6 +127,10 @@ void TerminalManager::configureTerminalShell() {
|
||||
: Sys::which( shellEnv ) );
|
||||
if ( !shellEnvStr.empty() )
|
||||
shellCombo->getListBox()->setSelected( shellEnvStr );
|
||||
} else if ( Sys::getPlatform() == "Windows" ) {
|
||||
std::string shellEnvStr( Sys::which( "powershell" ) );
|
||||
if ( !shellEnvStr.empty() )
|
||||
shellCombo->getListBox()->setSelected( shellEnvStr );
|
||||
}
|
||||
auto setShellFn = []( App* app, UIWindow* window, UIComboBox* shellCombo ) {
|
||||
std::string shell( shellCombo->getText().toUtf8() );
|
||||
|
||||
Reference in New Issue
Block a user