[haiku-commits] haiku: hrev46018 - src/preferences/screensaver

  • From: jscipione@xxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Wed, 4 Sep 2013 17:15:25 +0200 (CEST)

hrev46018 adds 3 changesets to branch 'master'
old head: bc61e2636658d8c15e0a8f67ab5363aaec22419f
new head: 9fc96190794f1ae996a483258d5c3848a29aa5f6
overview: http://cgit.haiku-os.org/haiku/log/?qt=range&q=9fc9619+%5Ebc61e26

----------------------------------------------------------------------------

28a2faa: ScreenSaver: use ceilf instead of ceil
  
  ... to restrict to single float precision. This is a little pedantic and silly
  but bare with me for the sake of consistency.

9bf1ba7: ScreenSaver: Just for good measure allow 4 lines of text here.
  
  ... just in case a long translation needs an extra line to fit
  (in English 3 is enough) and because we've got enough room next
  to the screen image to fit another line of text anyway.

9fc9619: ScreenSaver: Set target for turn off display checkbox
  
  I noticed while testing the nightly on vmware which, unlike vbox, includes
  a video driver with DPMS support that this checkbox wasn't working.
  This should fix it.

                                     [ John Scipione <jscipione@xxxxxxxxx> ]

----------------------------------------------------------------------------

2 files changed, 4 insertions(+), 3 deletions(-)
src/preferences/screensaver/PreviewView.cpp       | 2 +-
src/preferences/screensaver/ScreenSaverWindow.cpp | 5 +++--

############################################################################

Commit:      28a2faa30af39fd8ea31870d71f690cae8998f18
URL:         http://cgit.haiku-os.org/haiku/commit/?id=28a2faa
Author:      John Scipione <jscipione@xxxxxxxxx>
Date:        Wed Sep  4 15:06:30 2013 UTC

ScreenSaver: use ceilf instead of ceil

... to restrict to single float precision. This is a little pedantic and silly
but bare with me for the sake of consistency.

----------------------------------------------------------------------------

diff --git a/src/preferences/screensaver/PreviewView.cpp 
b/src/preferences/screensaver/PreviewView.cpp
index c44bf4f..4160cc3 100644
--- a/src/preferences/screensaver/PreviewView.cpp
+++ b/src/preferences/screensaver/PreviewView.cpp
@@ -52,7 +52,7 @@ PreviewView::PreviewView(const char* name)
        float aspectRatio = 4.0f / 3.0f;
                // 4:3 monitor
        float previewWidth = 160.0f;
-       float previewHeight = ceil(previewWidth / aspectRatio);
+       float previewHeight = ceilf(previewWidth / aspectRatio);
 
        SetExplicitSize(BSize(previewWidth, previewHeight));
 }

############################################################################

Commit:      9bf1ba7dcfe92cabedce255925309181b15b4daf
URL:         http://cgit.haiku-os.org/haiku/commit/?id=9bf1ba7
Author:      John Scipione <jscipione@xxxxxxxxx>
Date:        Wed Sep  4 15:10:02 2013 UTC

ScreenSaver: Just for good measure allow 4 lines of text here.

... just in case a long translation needs an extra line to fit
(in English 3 is enough) and because we've got enough room next
to the screen image to fit another line of text anyway.

----------------------------------------------------------------------------

diff --git a/src/preferences/screensaver/ScreenSaverWindow.cpp 
b/src/preferences/screensaver/ScreenSaverWindow.cpp
index 124f9b4..da796d8 100644
--- a/src/preferences/screensaver/ScreenSaverWindow.cpp
+++ b/src/preferences/screensaver/ScreenSaverWindow.cpp
@@ -317,7 +317,7 @@ FadeView::FadeView(const char* name, ScreenSaverSettings& 
settings)
                new BMessage(kMsgFadeCornerChanged), B_FOLLOW_NONE);
        BTextView* fadeNowText = new BTextView("FadeNowText", B_WILL_DRAW);
        fadeNowText->SetExplicitMinSize(BSize(B_SIZE_UNSET,
-               3 + textHeight * 3));
+               4 + textHeight * 4));
        fadeNowText->SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR));
        fadeNowText->MakeEditable(false);
        fadeNowText->MakeSelectable(false);
@@ -327,7 +327,7 @@ FadeView::FadeView(const char* name, ScreenSaverSettings& 
settings)
                new BMessage(kMsgNeverFadeCornerChanged), B_FOLLOW_NONE);
        BTextView* fadeNeverText = new BTextView("FadeNeverText", B_WILL_DRAW);
        fadeNeverText->SetExplicitMinSize(BSize(B_SIZE_UNSET,
-               3 + textHeight * 3));
+               4 + textHeight * 4));
        fadeNeverText->SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR));
        fadeNeverText->MakeEditable(false);
        fadeNeverText->MakeSelectable(false);

############################################################################

Revision:    hrev46018
Commit:      9fc96190794f1ae996a483258d5c3848a29aa5f6
URL:         http://cgit.haiku-os.org/haiku/commit/?id=9fc9619
Author:      John Scipione <jscipione@xxxxxxxxx>
Date:        Wed Sep  4 15:14:07 2013 UTC

ScreenSaver: Set target for turn off display checkbox

I noticed while testing the nightly on vmware which, unlike vbox, includes
a video driver with DPMS support that this checkbox wasn't working.
This should fix it.

----------------------------------------------------------------------------

diff --git a/src/preferences/screensaver/ScreenSaverWindow.cpp 
b/src/preferences/screensaver/ScreenSaverWindow.cpp
index da796d8..6bf9d61 100644
--- a/src/preferences/screensaver/ScreenSaverWindow.cpp
+++ b/src/preferences/screensaver/ScreenSaverWindow.cpp
@@ -379,6 +379,7 @@ FadeView::AttachedToWindow()
 {
        fEnableCheckBox->SetTarget(this);
        fRunSlider->SetTarget(this);
+       fTurnOffCheckBox->SetTarget(this);
        fTurnOffSlider->SetTarget(this);
        fFadeNow->SetTarget(this);
        fFadeNever->SetTarget(this);


Other related posts:

  • » [haiku-commits] haiku: hrev46018 - src/preferences/screensaver - jscipione