Fixed some minor bugs
This commit is contained in:
parent
ccb7eeb3c6
commit
9845a022a3
|
@ -54,7 +54,7 @@ class Dialog final : public finalcut::FDialog
|
|||
Dialog::Dialog (FWidget* parent)
|
||||
: finalcut::FDialog{parent}
|
||||
{
|
||||
setText ("Dialog");
|
||||
FDialog::setText ("Dialog");
|
||||
finalcut::FDialog::setGeometry (FPoint{26, 5}, FSize{28, 10});
|
||||
seconds.setGeometry (FPoint{10, 2}, FSize{10, 1});
|
||||
seconds.setLabelText ("Seconds");
|
||||
|
@ -87,14 +87,14 @@ Dialog::Dialog (FWidget* parent)
|
|||
//----------------------------------------------------------------------
|
||||
void Dialog::adjustSize()
|
||||
{
|
||||
finalcut::FDialog::adjustSize();
|
||||
int X = int((getDesktopWidth() - getWidth()) / 2);
|
||||
const int Y = 5;
|
||||
|
||||
if ( X < 1 )
|
||||
X = 1;
|
||||
|
||||
setPos ({X, Y}, false);
|
||||
finalcut::FDialog::adjustSize();
|
||||
setPos (FPoint{X, Y}, false);
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
@ -111,7 +111,7 @@ void Dialog::cb_start (const finalcut::FWidget*, const FDataPtr)
|
|||
return;
|
||||
|
||||
busy_indicator.start();
|
||||
addTimer(seconds.getValue() * 1000);
|
||||
addTimer(int(seconds.getValue() * 1000));
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
|
|
@ -198,7 +198,7 @@ std::size_t FProgressbar::drawProgressIndicator()
|
|||
if ( len >= bar_length )
|
||||
return len;
|
||||
|
||||
if ( round(length) > len || FTerm::getMaxColor() < 16 )
|
||||
if ( std::size_t(round(length)) > len || FTerm::getMaxColor() < 16 )
|
||||
{
|
||||
if ( FTerm::isMonochron() )
|
||||
setReverse(false);
|
||||
|
|
|
@ -732,9 +732,9 @@ void FScrollbar::jumpToClickPos (int x, int y)
|
|||
|
||||
if ( bar_orientation == fc::vertical )
|
||||
{
|
||||
if ( y >1 && y < int(getHeight()) )
|
||||
if ( y > 1 && y < int(getHeight()) )
|
||||
{
|
||||
new_val = int( round ( double(max - min) * (y - 2.0 - (slider_length/2))
|
||||
new_val = int( round ( double(max - min) * (y - 2.0 - double(slider_length/2))
|
||||
/ double(bar_length - slider_length) ) );
|
||||
}
|
||||
else
|
||||
|
@ -746,7 +746,7 @@ void FScrollbar::jumpToClickPos (int x, int y)
|
|||
|
||||
if ( x > 1 + nf && x < int(getWidth()) - nf )
|
||||
{
|
||||
new_val = int( round ( double(max - min) * (x - 2.0 - nf - (slider_length/2))
|
||||
new_val = int( round ( double(max - min) * (x - 2.0 - nf - double(slider_length/2))
|
||||
/ double(bar_length - slider_length) ) );
|
||||
}
|
||||
else
|
||||
|
|
|
@ -428,7 +428,7 @@ void FSpinBox::forceFocus()
|
|||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
void FSpinBox::cb_inputFieldActivate (finalcut::FWidget*, const FDataPtr)
|
||||
void FSpinBox::cb_inputFieldActivate (const finalcut::FWidget*, const FDataPtr)
|
||||
{
|
||||
processActivate();
|
||||
}
|
||||
|
|
|
@ -85,7 +85,7 @@ class FBusyIndicator : public FToolTip
|
|||
const FString getClassName() const override;
|
||||
|
||||
// Inquiries
|
||||
bool isRunning();
|
||||
bool isRunning() const;
|
||||
|
||||
// Methods
|
||||
void start();
|
||||
|
@ -116,7 +116,7 @@ inline const FString FBusyIndicator::getClassName() const
|
|||
{ return "FBusyIndicator"; }
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
inline bool FBusyIndicator::isRunning()
|
||||
inline bool FBusyIndicator::isRunning() const
|
||||
{
|
||||
return running;
|
||||
}
|
||||
|
|
|
@ -140,7 +140,7 @@ class FSpinBox : public FWidget
|
|||
void forceFocus();
|
||||
|
||||
// Callback methods
|
||||
void cb_inputFieldActivate (finalcut::FWidget*, const FDataPtr);
|
||||
void cb_inputFieldActivate (const finalcut::FWidget*, const FDataPtr);
|
||||
void cb_inputFieldChange (finalcut::FWidget*, const FDataPtr);
|
||||
|
||||
// Data members
|
||||
|
|
|
@ -97,7 +97,7 @@ class FStartOptions final
|
|||
uInt16 : 15; // padding bits
|
||||
|
||||
fc::encoding encoding{fc::UNKNOWN};
|
||||
std::ofstream logfile_stream;
|
||||
std::ofstream logfile_stream{};
|
||||
static FStartOptions* start_options;
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue