Fixed some minor bugs

This commit is contained in:
Markus Gans 2020-06-11 23:00:18 +02:00
parent ccb7eeb3c6
commit 9845a022a3
7 changed files with 13 additions and 13 deletions

View File

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

View File

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

View File

@ -734,7 +734,7 @@ void FScrollbar::jumpToClickPos (int x, int y)
{
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

View File

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

View File

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

View File

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

View File

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