Table View Grid Lines and Cocoa #1198

Open
aljungberg opened this Issue Mar 29, 2011 · 3 comments

Comments

Projects
None yet
3 participants
Owner

aljungberg commented Mar 29, 2011

As it stands we are doing things a little differently from Cocoa. The following screenshots illustrate how Cocoa handles grid lines in various selection scenarios.

First, Cocoa always draws grid lines in their standard colour even when rows or columns are selected. I implemented this change already in 094b798 so this is merely for reference:

http://dl.dropbox.com/u/10127183/Long/Cappuccino/Cocoa%20Grid%20Both%20Draws%20on%20top%20of%20Single%20Row%20Selection.png
http://dl.dropbox.com/u/10127183/Long/Cappuccino/Cocoa%20Grid%20Both%20Draws%20on%20top%20of%20Multiple%20Row%20Selection%20.png
http://dl.dropbox.com/u/10127183/Long/Cappuccino/Cocoa%20Grid%20Both%20Draws%20on%20top%20of%20Single%20Column%20Selection.png
http://dl.dropbox.com/u/10127183/Long/Cappuccino/Cocoa%20Grid%20Both%20Draws%20on%20top%20of%20Multiple%20Column%20Selection.png
http://dl.dropbox.com/u/10127183/Long/Cappuccino/Cocoa%20Grid%20Draws%20Even%20with%20No%20Intercell%20Spacing.png

But we still behave differently than Cocoa when grid lines are off. Cocoa inserts white lines between the selected elements automatically. If rows are selected, white lines show between each selected row. If columns are selected, white lines show between each selected column:

http://dl.dropbox.com/u/10127183/Long/Cappuccino/Cocoa%20Grid%20None%20Draws%20White%20Lines%20Between%20Selected%20Rows.png
http://dl.dropbox.com/u/10127183/Long/Cappuccino/Cocoa%20Grid%20None%20Draws%20White%20Lines%20Between%20Selected%20Columns.png

There is one exception. If intercell spacing is set to 0, no white spacer lines are drawn when grid lines are off:

http://dl.dropbox.com/u/10127183/Long/Cappuccino/Cocoa%20Grid%20None%20Draws%20No%20White%20Lines%20when%20Intercell%20Spacing%20is%200.png

At this time we differ from the above in two points: we draw white lines between selected rows but not between selected columns. Furthermore if the intercell spacing is set to 0, we still draw lines between rows.

Finally there is the question of theme attributes. Our white lines are based on the 'highlighted-grid-color' theme attribute. The name suggests the purpose of this theme attribute is to use a different grid colour when rows or columns are selected. But after my last change, this theme attribute now instead is used to pick the colour used when grid lines are off and separators are needed for selection purposes only.

If we still want to support using a different grid colour for highlighted cells we should modify the grid drawing code to break up the grid line drawing operation and switch the colour as needed.

We should probably have a different theme attribute to describe the colour used for the 'automatic' separator lines used when no grid lines are configured.

cappbot commented May 9, 2012

Label: #new. What's next? A reviewer should examine this issue.

Contributor

ahankinson commented Feb 16, 2013

-#new
+#acknowledged
+Theme
+bug
milestone=Someday

cappbot commented Feb 16, 2013

Milestone: Someday. Labels: #acknowledged, Theme, bug. What's next? A reviewer should examine this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment