Skip to content

CSS Theming & Aristo 3 : Work in progress

Didier Korthoudt edited this page Feb 10, 2020 · 49 revisions

You can find on this page the current state of CSS Theming & Aristo 3 CSS theme as it is pushed in PR's.

I'll adapt this page as often as possible, so you'll be able to test what's ready (or testable even if not finished).

As list of known problems can be found at the end of this page.

Add the following declarations in your Info.plist :

  • CPDefaultTheme : Aristo3

Known problems

  • CPTokenField the letters g and j fall of the tokenfield. (@jasperdeb)
  • CPCheckBox as an element in a CPTableView the animation is also there when the data in the CPTableView is (re)loaded. (@jasperdeb)
  • autosave seems to break tables, … during initialization (@didierkorthoudt)

capp_env Aristo3 "Work in Progress"

Here is a built Aristo3 capp_env archive. It's a clone of my own dev environment (so with plenty of debug messages, ...). In order to use it :

  • Download the working environment somewhere on your machine
  • use capp_env to activate it : source PATH_TO_WHERE_YOU_SAVED_THE_WORK_ENVIRONMENT/work/bin/activate
  • use capp to link to Aristo3 : capp gen -l -f --force PATH_TO_YOUR_PROJECT
  • nib2cib your xibs
  • if you use XcodeCapp, you can change the « Additional Toolchain Paths » default path to : PATH_TO_WHERE_YOU_SAVED_THE_WORK_ENVIRONMENT/work/narwhal/bin

2020-02-10

What's new :

  • CPTextField should now be 100% done. All types of borders (none, bezeled, rounded, bordered), background colors, initial caret positioning, all control sizes, ...

This version can be downloaded here : http://www.segi.be/capptests/work-20200210.zip

2020-02-01

What's new :

  • CPDatePicker should be fully operational with active clock hands ;-) Use CPDatePickerTest manual test to play with it...

This version can be downloaded here : http://www.segi.be/capptests/work-20200201.zip

2019-11-07

What's new :

  • CPDatePicker graphical calendar should be OK (not yet graphical clock, nor textual date pickers)
  • Fixed (yet another) problem with split views during Cib decoding
  • many little fixes

This version can be downloaded here : http://www.segi.be/capptests/work-20191107.zip

2019-09-17

What's new :

  • Fixed a problem when a CPSplitView was decoded from a CIB file (thus, created within IB)
  • Fixed missing up & down arrows in too long menus
  • Added a new CPButton method - (void)setHoveredImage:(CPImage)anImage that permit to specify an image to be displayed when the mouse is over the button
  • Added the ability to use Google Material Icons (see https://material.io/resources/icons/?icon=work&style=baseline) as CPImage, even with animation capabilities. See documentation here : https://github.com/cappuccino/cappuccino/wiki/Using-material-icons-in-Cappuccino
  • Added the ability to use such Material Icons images directly in IB everywhere you can use template images. Just use, as image name and instead of, for example, NSActionTemplate, name@MaterialIcons where name is the name of the icon (settings for example).

This version can be downloaded here : http://www.segi.be/capptests/work-20190917.zip

2019-09-05

What's new :

  • Fixed a problem when using setTextColor on cell based table cells
  • Fixed a problem when using setPosition:ofDividerAtIndex: on a split view created by code

This version can be downloaded here : http://www.segi.be/capptests/work-20190905.zip

2019-08-25

What's new :

  • CPPopUpButton (pulldowns and popups) now play more nicely with non standard heights
  • CPButton now implement all types of buttons (as in IB) : Push, Square, Gradient, Textured rounded, Round rect, Recessed, Inline, Bevel and Textured. For now, only bordered versions are available (unbordered are coming soon).

This version can be downloaded here : http://www.segi.be/capptests/work-20190825.zip

2019-08-20

What's new :

  • CPBox is now conform to modern Cocoa NSBox. Pay attention that, in modern Cocoa, only primary, separator and custom box types are valid. setBorderType is deprecated. If you want to customize the fill color and/or the border color (and other border attributes like width and corner radius), you have to select CPBoxCustom as box type and CPLineBorder as border type (even if setBorderType is deprecated, thank you Apple). The new "setTransparent:" is implemented. Please note that CSS theming will only be used for non custom boxes. Due to a bug in ibtool, the transparent flag is not correctly translated by nib2cib (it is always NO). You have to set it by code.

This version can be downloaded here : http://www.segi.be/capptests/work-20190820.zip

2019-08-19

What's new :

  • Fix in CPButton (when created from code)

This version can be downloaded here : http://www.segi.be/capptests/work-20190819.zip

2019-08-18

What's new :

  • Sheets are now working and are 100% CSS based
  • CPPopover can now use the background color you put on the view that will be popped. You can use a "User Defined Runtime Attribute" on your view named "backgroundColor", of type "color". Alpha is working.

This version can be downloaded here : http://www.segi.be/capptests/work-20190818.zip

2019-08-07

What's new :

  • Some code cleaning in CPButtonBar
  • Introduction of "OS Behavior". See documentation
  • Adaptation of window title bar : buttons (close/minimize/zoom) and title behaviors (and Windows specific version)

This version can be downloaded here : http://www.segi.be/capptests/work-20190807.zip

2019-08-01

What's new :

  • CPButtonBar 2.0 (see documentation)
  • XcodeCapp : this version includes a new file in the "Cocoa Classes" project folder called "AppKit.h" needed to be able to bind a delegate for a CPButtonBar. Important : you have to reset your project file using the little "cyclic arrow" of XcodeCapp, once per project
  • Menus : finalized menus with pure CSS marks (submenu, on and mixed states), in all 3 sizes
  • Window buttons : specific Cappuccino window buttons (so they can't be confused with platform buttons) with platform specific layouts (left aligned on Mac, right aligned on Windows)
  • Many little fixes here and there...

This version can be downloaded here : http://www.segi.be/capptests/work-20190801.zip And XcodeCapp here : http://www.segi.be/capptests/XcodeCapp.zip

2019-05-14

What's new :

  • CPSplitView should be now retro-compatible with Aristo2
  • CPSplitView should be optimized in terms of performances
  • CPSplitView code cleaned
  • CPSearchField : if you set " " (a single space) as placeholder, it will left align the magnifier even when not editing (this is a disruption from Cocoa but it permits you to choose your search field look)

This version can be downloaded here : http://www.segi.be/capptests/work-20190514.zip

2019-05-09

What's new :

  • CPSplitView now provides a correct pane divider, with the same look&feel as Cocoa.
  • CPButton now correctly displays its label

This version can be downloaded here : http://www.segi.be/capptests/work-20190509.zip

2019-05-08

What's new :

  • CPSplitView should be ready for tests. Some optimization needs to be done (and code clean up), and Aristo2 compatibility is not yet fixed.
  • Please note that CPSplitView follows now the modern Cocoa way but without CPSplitViewController (so also without NSSplitViewItem). Please refer to the documentation (https://developer.apple.com/documentation/appkit/nssplitview?language=objc) for new methods (arrangedSubviews, arrangesAllSubviews, -addArrangedSubview:, insertArrangedSubview:atIndex:, -removeArrangedSubview:). Holding priorities are not implemented as we don't have (yet) auto layout in Cappuccino.
  • Of course, CPSplitView is 100% CSS based.

This version can be downloaded here : http://www.segi.be/capptests/work-20190508.zip

2019-05-05

What's new :

  • CPSearchField is now available in the 3 control sizes (regular, small, mini) and should be fully operational.
  • CPFont is now themed. That means that you don't have to add anything to your Info.plist (beside specifying Aristo3 as default theme), nor to your index(-debug).html (if you had done this with previous release, please step back as this could interfere). CSS font definition is now done automatically at runtime, based on the theme. Remark : if you specify the system font in your Info.plist, this will have priority over theme values (so you keep your font).
  • I've started to clean up font definitions in the theme descriptors to that controls effectively use system font (in the correct size)

This version can be downloaded here : http://www.segi.be/capptests/work-20190505.zip

2019-04-30

What's new :

  • CPSearchField fixes :

    • Consistent behavior with modern Cocoa when losing then getting back key first responder (when changing key window)
    • When a search action is set, "return" now selects the input characters
    • When clicking on the cancel search cross (or "esc"), the field looses its first key responder status (consistent with Cocoa)
    • Correct animation of the magnifier and placeholder text when entering the field (the input caret now appears AFTER the end of the animation)
    • Correct tracking areas management
  • CPMenu fixes (for the search menu but also for all menus) :

    • When an item is selected, passing the mouse over an inactive item deselects the first one (consistent with Cocoa)
    • When using keyboard arrows to navigate the menu, now stops at first/last active item (consistent with Cocoa)
    • When typing characters, now correctly filters them (blocking them from being also entered in the search field)

This version can be downloaded here : http://www.segi.be/capptests/work-20190430.zip

2019-04-28