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