Correction for height and width alignment in adjustSize()
This commit is contained in:
parent
3a391f5fe5
commit
23ddf5d6f2
|
@ -1,4 +1,5 @@
|
|||
2019-12-23 Markus Gans <guru.mail@muenster.de>
|
||||
* Correction for height and width alignment in adjustSize()
|
||||
* Better setSize() implementation in some widgets
|
||||
|
||||
2019-12-20 Markus Gans <guru.mail@muenster.de>
|
||||
|
|
|
@ -142,36 +142,24 @@ Background::Background (finalcut::FWidget* parent)
|
|||
F_METHOD_CALLBACK (this, &finalcut::FApplication::cb_exitApp)
|
||||
);
|
||||
|
||||
red.addCallback
|
||||
(
|
||||
"changed",
|
||||
F_METHOD_CALLBACK (this, &Background::cb_changed)
|
||||
);
|
||||
|
||||
green.addCallback
|
||||
(
|
||||
"changed",
|
||||
F_METHOD_CALLBACK (this, &Background::cb_changed)
|
||||
);
|
||||
|
||||
blue.addCallback
|
||||
for (const auto spinbox : {&red, &green, &blue})
|
||||
{
|
||||
spinbox->addCallback
|
||||
(
|
||||
"changed",
|
||||
F_METHOD_CALLBACK (this, &Background::cb_changed)
|
||||
);
|
||||
}
|
||||
|
||||
for (const auto& signal : {"row-changed", "clicked"})
|
||||
{
|
||||
color_choice.addCallback
|
||||
(
|
||||
"clicked",
|
||||
F_METHOD_CALLBACK (this, &Background::cb_choice)
|
||||
);
|
||||
|
||||
color_choice.addCallback
|
||||
(
|
||||
"row-changed",
|
||||
signal,
|
||||
F_METHOD_CALLBACK (this, &Background::cb_choice)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
Background::~Background() // destructor
|
||||
|
|
|
@ -512,18 +512,15 @@ void FComboBox::initCallbacks()
|
|||
F_METHOD_CALLBACK (this, &FComboBox::cb_setInputField)
|
||||
);
|
||||
|
||||
for (const auto& signal : {"row-selected", "clicked"})
|
||||
{
|
||||
list_window.list.addCallback
|
||||
(
|
||||
"row-selected",
|
||||
F_METHOD_CALLBACK (this, &FComboBox::cb_closeComboBox)
|
||||
);
|
||||
|
||||
list_window.list.addCallback
|
||||
(
|
||||
"clicked",
|
||||
signal,
|
||||
F_METHOD_CALLBACK (this, &FComboBox::cb_closeComboBox)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
void FComboBox::draw()
|
||||
|
|
|
@ -1646,6 +1646,7 @@ void FWidget::onAccel (FAccelEvent*)
|
|||
//----------------------------------------------------------------------
|
||||
void FWidget::onResize (FResizeEvent* ev)
|
||||
{
|
||||
// The terminal was resized
|
||||
rootObject->resize();
|
||||
rootObject->redraw();
|
||||
ev->accept();
|
||||
|
@ -1779,7 +1780,7 @@ inline void FWidget::insufficientSpaceAdjust()
|
|||
adjust_wsize.y2_ref()--;
|
||||
|
||||
if ( getHeight() < size_hints.min_height )
|
||||
adjust_wsize.setWidth(size_hints.min_height);
|
||||
adjust_wsize.setHeight(size_hints.min_height);
|
||||
|
||||
if ( getHeight() == 0 )
|
||||
adjust_wsize.setHeight(1);
|
||||
|
|
Loading…
Reference in New Issue