[haiku-commits] haiku: hrev51611 - src/kits/interface

  • From: waddlesplash@xxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Thu, 23 Nov 2017 20:22:38 +0100 (CET)

hrev51611 adds 3 changesets to branch 'master'
old head: 14d690378fbdeaba2b940f31d07f95ef861921a3
new head: e042a53b7dde38ec4630b63df74219d8ed859dba
overview: 
http://cgit.haiku-os.org/haiku/log/?qt=range&q=e042a53b7dde+%5E14d690378fbd

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

1641a0516d9e: Fix aligning when text growing more than the right bound..
  
  because the bound scrolls to the current cursor to view the text 
(ScrollToOffset).
  Follow up #12608
  
  Signed-off-by: Augustin Cavalier <waddlesplash@xxxxxxxxx>

                                              [ hyche <cvghy116@xxxxxxxxx> ]

484f64f31568: TextInput: Align the text when typing or removing.
  
  Signed-off-by: Augustin Cavalier <waddlesplash@xxxxxxxxx>
  Closes #13796.

                                              [ hyche <cvghy116@xxxxxxxxx> ]

e042a53b7dde: configure: Avoid bashism introduced in previous hrev.

                              [ Augustin Cavalier <waddlesplash@xxxxxxxxx> ]

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

2 files changed, 6 insertions(+), 4 deletions(-)
configure                        | 5 +++--
src/kits/interface/TextInput.cpp | 5 +++--

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

Commit:      1641a0516d9e8228a0189a83a688532d6554d271
URL:         http://cgit.haiku-os.org/haiku/commit/?id=1641a0516d9e
Author:      hyche <cvghy116@xxxxxxxxx>
Date:        Thu Nov 23 17:43:22 2017 UTC
Committer:   Augustin Cavalier <waddlesplash@xxxxxxxxx>
Commit-Date: Thu Nov 23 19:10:11 2017 UTC

Ticket:      https://dev.haiku-os.org/ticket/12608

Fix aligning when text growing more than the right bound..

because the bound scrolls to the current cursor to view the text 
(ScrollToOffset).
Follow up #12608

Signed-off-by: Augustin Cavalier <waddlesplash@xxxxxxxxx>

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

diff --git a/src/kits/interface/TextInput.cpp b/src/kits/interface/TextInput.cpp
index 6ed6455..ecfc4d0 100644
--- a/src/kits/interface/TextInput.cpp
+++ b/src/kits/interface/TextInput.cpp
@@ -182,12 +182,12 @@ _BTextInput_::AlignTextRect()
                        break;
 
                case B_ALIGN_RIGHT:
-                       hInset  = textRect.right - textFontWidth;
+                       hInset  = textRect.Width() - textFontWidth;
                        hInset -= be_control_look->DefaultLabelSpacing();
                        break;
 
                case B_ALIGN_CENTER:
-                       hInset = (textRect.right - textFontWidth) / 2.0;
+                       hInset = (textRect.Width() - textFontWidth) / 2.0;
                        break;
 
                default:

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

Commit:      484f64f315680eae5dcf5ad8b74325c3debc6da9
URL:         http://cgit.haiku-os.org/haiku/commit/?id=484f64f31568
Author:      hyche <cvghy116@xxxxxxxxx>
Date:        Thu Nov 23 17:49:23 2017 UTC
Committer:   Augustin Cavalier <waddlesplash@xxxxxxxxx>
Commit-Date: Thu Nov 23 19:12:24 2017 UTC

Ticket:      https://dev.haiku-os.org/ticket/13796

TextInput: Align the text when typing or removing.

Signed-off-by: Augustin Cavalier <waddlesplash@xxxxxxxxx>
Closes #13796.

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

diff --git a/src/kits/interface/TextInput.cpp b/src/kits/interface/TextInput.cpp
index ecfc4d0..d744595 100644
--- a/src/kits/interface/TextInput.cpp
+++ b/src/kits/interface/TextInput.cpp
@@ -116,6 +116,7 @@ _BTextInput_::KeyDown(const char* bytes, int32 numBytes)
 
                default:
                        BTextView::KeyDown(bytes, numBytes);
+                       AlignTextRect();
                        break;
        }
 }

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

Revision:    hrev51611
Commit:      e042a53b7dde38ec4630b63df74219d8ed859dba
URL:         http://cgit.haiku-os.org/haiku/commit/?id=e042a53b7dde
Author:      Augustin Cavalier <waddlesplash@xxxxxxxxx>
Date:        Thu Nov 23 19:21:38 2017 UTC

configure: Avoid bashism introduced in previous hrev.

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

diff --git a/configure b/configure
index 7906ce0..6df6a38 100755
--- a/configure
+++ b/configure
@@ -353,11 +353,12 @@ set_default_value()
 get_build_tool_path()
 {
        local var="HAIKU_$1"
+       local varval=`get_variable $var`
        local cmd=$2
 
-       if [ ! -z "${!var}" ]; then
+       if [ ! -z "$varval" ]; then
                # this variable is already set (probably by user) so grab its 
contents
-               cmd=${!var}
+               cmd=$varval
        fi
 
        local path=${cmd%% *}


Other related posts:

  • » [haiku-commits] haiku: hrev51611 - src/kits/interface - waddlesplash