diff options
author | Sam Spilsbury <smspillaz@gmail.com> | 2010-08-16 07:24:03 +0800 |
---|---|---|
committer | Sam Spilsbury <smspillaz@gmail.com> | 2010-08-16 07:24:03 +0800 |
commit | 6aaea013f0e3308a4fd846eb63bfe3f26394e591 (patch) | |
tree | cb80d4e58722e5200e6db06593b77881ff86beca | |
parent | 0f94ef537c705b4af3ec1b715f8809ecb1c165b5 (diff) | |
download | shift-6aaea013f0e3308a4fd846eb63bfe3f26394e591.tar.gz shift-6aaea013f0e3308a4fd846eb63bfe3f26394e591.tar.bz2 |
Make cover angle configurable
-rw-r--r-- | shift.xml.in | 44 | ||||
-rw-r--r-- | src/shift.cpp | 4 |
2 files changed, 31 insertions, 17 deletions
diff --git a/shift.xml.in b/shift.xml.in index 2397ca2..48e26b2 100644 --- a/shift.xml.in +++ b/shift.xml.in @@ -242,21 +242,35 @@ <precision>0.01</precision> </option> </subgroup> - <option name="flip_rotation" type="int"> - <_short>Flip angle</_short> - <_long>Rotation angle of the flip animation</_long> - <default>30</default> - <min>-80</min> - <max>80</max> - </option> - <option name="cover_offset" type="float"> - <_short>Cover offset</_short> - <_long>Cover movement offset.</_long> - <default>0.0</default> - <min>-0.4</min> - <max>0.4</max> - <precision>0.01</precision> - </option> + <subgroup> + <_short>Flip</_short> + <option name="flip_rotation" type="int"> + <_short>Flip angle</_short> + <_long>Rotation angle of the flip animation</_long> + <default>30</default> + <min>-80</min> + <max>80</max> + </option> + </subgroup> + <subgroup> + <_short>Cover</_short> + <option name="cover_offset" type="float"> + <_short>Cover offset</_short> + <_long>Cover movement offset.</_long> + <default>0.0</default> + <min>-0.4</min> + <max>0.4</max> + <precision>0.01</precision> + </option> + <option name="cover_angle" type="float"> + <_short>Cover angle</_short> + <_long>How much windows should be tilted.</_long> + <default>90</default> + <min>0</min> + <max>360</max> + <precision>0.1</precision> + </option> + </subgroup> <option name="overlay_icon" type="int"> <_short>Overlay Icon</_short> <_long>Overlay an icon on windows in the shift switcher</_long> diff --git a/src/shift.cpp b/src/shift.cpp index 56eca52..8a9876d 100644 --- a/src/shift.cpp +++ b/src/shift.cpp @@ -625,7 +625,7 @@ ShiftScreen::layoutThumbsCover () sw->mSlots[i].z = fabs (distance); sw->mSlots[i].z *= -(maxThumbWidth / (2.0 * oe.width ())); - sw->mSlots[i].rotation = sin(pos * PI * 0.5) * -60; + sw->mSlots[i].rotation = sin(pos * PI * 0.5) * -optionGetCoverAngle (); } else { @@ -637,7 +637,7 @@ ShiftScreen::layoutThumbsCover () sw->mSlots[i].x = centerX; sw->mSlots[i].x += sin(ang) * rad * oe.width (); - sw->mSlots[i].rotation = 90; + sw->mSlots[i].rotation = optionGetCoverAngle () + 30; sw->mSlots[i].rotation -= fabs(ang) * 180.0 / PI; sw->mSlots[i].rotation *= -pos; |