Correction for height and width alignment in adjustSize()

This commit is contained in:
Markus Gans 2019-12-23 14:20:31 +01:00
parent 3a391f5fe5
commit 23ddf5d6f2
4 changed files with 27 additions and 40 deletions

View File

@ -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>

View File

@ -142,35 +142,23 @@ 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)
);
}
}
//----------------------------------------------------------------------

View File

@ -512,17 +512,14 @@ 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)
);
}
}
//----------------------------------------------------------------------

View File

@ -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);