Project

General

Profile

unexist.dev

Assorted tidbits and projects

Bug #203

Gravity calculation issue

Added by Lasse Christensen over 13 years ago. Updated over 13 years ago.

Status:
Fixed
Priority:
Urgent
Category:
Bugfix
Target version:
Start date:
05/12/2011
Due date:
% Done:

100%

Estimated time:
0.00 h

Description

This issue was first reported by dwfreed, and confirmed by lchr and unexist on IRC.

Using a 1680x1050 screen with a 17px top panel and 1033px of vertical space results in the following output from subtler -el:

0 0 x 17 1680 + 1033

Setting up four windows with 25% height and placing them at y-values of 0, 25, 50, and 75 results in the following subtler -cl output:

1 4 x 21 + 1672 + 250
1 4 x 214 + 1672 + 250
1 4 x 408 + 1672 + 250
1 4 x 602 + 1672 + 250

The y-values are 21, 214, 408, and 602, which is incorrect given the gravities specified. The fourth window should (by my quick math, which may be inaccurate) be defined as:

1 4 x 796 + 1672 + 250

0-25-50-75.png (518 KB) 0-25-50-75.png Four 25% height rows set to y-values of 0,25,50,75 Lasse Christensen, 05/12/2011 11:08 PM

History

#1 Updated by Lasse Christensen over 13 years ago

Whoops, that calculation IS wrong; I was calculating the position of a window placed at gravity [0, 88, 100, 25]. For an y-value of 75, the window should be:

1 4 x 646 + 1672 + 250

#2 Updated by Lasse Christensen over 13 years ago

Ah, a final note:

I know you don't need me to calculate the correct placement. I was just trying to figure out if I had understood the problem correctly.

#3 Updated by Christoph Kappel over 13 years ago

  • Target version set to Nu
  • Assignee set to Non member users

#4 Updated by Christoph Kappel over 13 years ago

  • % Done changed from 0 to 100
  • Status changed from Unconfirmed to Fixed

Applied in changeset 503e5e44ceae.

Also available in: Atom PDF