[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [gcompris/gsoc_pulkit_digital_electricity] src/activities/digital_electricity: digital_electricity: 
From:       Rudra Nil Basu <null () kde ! org>
Date:       2017-08-24 11:12:58
Message-ID: E1dkq4I-0000Hd-FJ () code ! kde ! org
[Download RAW message or body]

Git commit 62e856707be14f9f5824e90f8d8a2d7cb258c9f6 by Rudra Nil Basu.
Committed on 24/08/2017 at 10:57.
Pushed by rudranilbasu into branch 'gsoc_pulkit_digital_electricity'.

digital_electricity: Reduced size of dragged component

Previously, the size of the dragged component was constant regardless
of the current zoom amount. The size is determined under the toFull()
function in the DragListItem.qml, in which we have the width and the
height set as:

  width = fullWidth
  height = fullHeight

which is changed to:

   width = fullWidth * Activity.currentZoom
   height = fullHeight * Activity.currentZoom

to make the size of the dragged component dependent on the size of the
zoom amount.

Signed-off-by: Rudra Nil Basu <rudra.nil.basu.1996@gmail.com>

M  +2    -2    src/activities/digital_electricity/DragListItem.qml

https://commits.kde.org/gcompris/62e856707be14f9f5824e90f8d8a2d7cb258c9f6

diff --git a/src/activities/digital_electricity/DragListItem.qml \
b/src/activities/digital_electricity/DragListItem.qml index 73394db0..934e580e 100644
--- a/src/activities/digital_electricity/DragListItem.qml
+++ b/src/activities/digital_electricity/DragListItem.qml
@@ -87,8 +87,8 @@ Item {
             }
 
             function toFull() {
-                width = fullWidth
-                height = fullHeight
+                width = fullWidth * Activity.currentZoom
+                height = fullHeight * Activity.currentZoom
                 small = false
             }
 


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic