Ismael's blog

Aller au contenu | Aller au menu | Aller à la recherche

Wednesday 18 July 2007

GSOC: native check and radio marks for menus

Today, after some search on the Apple Developer mailing-lists, I implemented the drawing of native check marks and radio marks for menus.

So here are the usual screenshots (check marks on the top; radio marks on the bottom); I let you guess which are VCL style and which are aqua style ;-)


This code has been committed to aquavcl02

Monday 16 July 2007

GSOC: non-native border

Many controls are now aqua but some win32 style borders were still visible. After some investigations, I found that many borders were drawn in the platform independent part of VCL without any call to drawNativeControl() or getNativeControlRegion(), in vcl/source/window/decoview.cxx. So I added these call and the corresponding code in the native part of VCL. I also added new flags to salnativewidgets.hxx: CTRL_FRAME and PART_BORDER. Now VCL call native functions to draw borders, if the native functions can't draw them (return false), the platform independent part of VCL draws them like it did before my patch.

Some screenshots now (on the left, VCL borders; on the right, aqua borders):


Not all 3D borders are drawn natively yet, as they may be drawn in some other part of VCL.

Contextual menus have no more 3D borders:

But, this patch still needs some work, because it makes dropdown listboxes strange; see:


Another bug, is that there's a black pixel on the top right corner and another one on the bottom left corner of some frames.

Finally, the link to the patch: http://lebasket.free.fr/OOo/16_07_07/patchNativeBorder.diff


Update: the bug concerning listboxes has been fixed thanks to the help of my mentor Eric Bachard and so the code has been committed to aquavcl02

Monday 9 July 2007

GSOC: TextEdits, SpinBoxes,...

I continued my GSOC by implementing some other aqua controls for the macport:

  • TextEdits and MultiLine Edits: I replaced the old style of frame by the aqua one. The focus rect isn't drawn yet. (Old style on the left, aqua on the right):

  • Non-dropdown listboxes are also drawn natively.

  • Spinboxes have also native style, both text field and spin buttons. I continued the work of Eric Bachard who started the implementation of the spin buttons. We both faced crashs because of the SpinButtonValue passed as argument (const ImplControlValue& aValue) of drawNativeControl(). Indeed, the optional value (aValue.getOptionalVal()) which is needed to know the state of the spinbuttons was sometimes null and reading the state (pSpinButtonVal->mnUpperState) was the cause of the crash. Now, the pointer value is tested to avoid crashes (if(pSpinButtonVal))


All these changes have been committed to aquavcl02.

Tuesday 3 July 2007

GSOC: Focus tabs and bold text

On some platforms, the focused tab hasn't bold text. It's the case not only for MacOS X but also for Gnome and maybe for other platforms. For Gnome, i didn't know it until i received a mail from a gnome user who explained me the problem and gave me the link to the Gnome Human Interface Guidelines ( http://developer.gnome.org/projects/gup/hig/2.0/controls-notebooks.html ). The problem is that on VCL, this feature is in the platform independent part although it depends on the platform. So I added a variable to the ImplSVNWFData structure in vcl/inc/vcl/svdata.hxx to choose whether selected tab has bold text or not. I also modified vcl/source/control/tabctrl.cxx to check this variable.

The patch is here

Update: patch committed to aquavcl02

Monday 2 July 2007

GSOC: Aqua Dropdown Listboxes

These last days I started to work on drop down listboxes. I implemented the drawing of the button some weeks ago, but listboxes hadn't an aqua look, the drawing of their frame didn't call the native functions. So, I looked at the platform independent part of VCL, and I created a new class of listbox windows, inspired by the floating menu class, and helped by advice of Philipp Lohmann. I added two variables to the ImplSVNWFData structure (svdata.hxx) to chose which listbox window should be used, and if it has scrollbars or scroll symbols like popup menus.

Old style of listbox:


New style of listbox (without and with scroll symbols):


But some bugs still exist, and some features have still to be implemented. For example, there's sometimes a drawing bug (which concerns only listboxes with scroll symbols): some entries and the scroll symbols are not drawn.

Another bug appears when the user clicks the listbox, if the mouse pointer is not in the region of the popup window, this popup window disappears.

Concerning missing features, the checkmark for the selected item is not yet implemented. And when the mouse is over the scroll symbols, the window doesn't scroll yet.


Correct drop down listbox (image from the Apple Human Interface Guidelines):


I'll continue my work these next days to have a more stable and feature complete listbox control.

The patch is here: http://lebasket.free.fr/OOo/02_07_07/patchListBox.diff