Re: [Lazarus] OI Checkboxes

2014-11-26 Thread Juha Manninen
On Wednesday, November 26, 2014, Vojtěch Čihák 
wrote:

> I considered other solution. Create a new simple visual component
> (TCheckBoxThemed or so). It will have class method:
>
> class procedure PaintSelf(ACanvas: TCanvas; AChecked: Boolean);
>

Ok, the class paint method allows drawing non-active checkboxes without an
overhead.
It is a good idea. Sandro Cumerlato was planning for something similar, a
white background and clicking anywhere on a selected row would change the
state.
Please communicate with him if you plan to implement it. You both are
custom component wizards.

Lazarus 1.4 will be forked soon (1-2 months). A realistic plan is to
leave the current checkbox there for 1.4 and put the new one in trunk.
The current solution works well, too.

Bart, we must do custom painting without widgetset overhead for the
non-selected rows in OI. There can be tens of published booleans in a
component and OI must be snappy.

Juha
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Lazarus 1.2.6 IDE Docking Broken

2014-11-26 Thread Mattias Gaertner
On Wed, 26 Nov 2014 12:15:07 -0500
"m...@rpzdesign.com"  wrote:

> I tried to use Lazarus 1.2.6 and Lazarus 1.2.4 on WIndows 8.1 x64.
> 
> Installed the 386 version of Lazarus/Freepascal.
> 
> When I tried to use the AnchorDockingDesign 0.5, 0.6 packages for the
> IDE, the editor dies.

It works on Win7. The default layout is loaded wrong. This bug has been
fixed in the development version.
I have not seen the editor dying from the anchordocking package.

 
> Does not occur on Linux from what I can tell.
> 
> An attached screen shot in included.

Mattias

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Editor key-strokes

2014-11-26 Thread m...@rpzdesign.com
Mr Gabor:

You rock.

md

On 11/26/2014 9:07 AM, Péter Gábor wrote:
> I think that you problem is not Key Options related,
> take a look at:
> Tools --> Options --> Editor --> Overwrite block
> 
> It is checked here.
> 
> 2014-11-26 13:50 keltezéssel, m...@rpzdesign.com írta:
>> How does someone set the delete key in Key Options to both delete the
>> char at the position in the editor AND ALSO delete the highlighted block.
>>
>> Seems a bit strange that the delete key could not both: "Delete Block"
>> and "Delete char at cursor"
>>
>> Normally, hitting the delete key will remove code at the cursor.  THen
>> when you select a block of text, delete will remove it.
>>
>> No so with the lazarus editor.  Or am I wrong?
>>
>> Anybody have any ideas?
>>
>> How do you set this up.
>>
>> Seems a bit crazy that there is no "Save key mapping to file" option,
>> but pre-canned schemes that nobody can modify and save with their own
>> preferences.
>>
>> Cheers,
>>
>> md
>>
>>
>>
>>
>> --
>> ___
>> Lazarus mailing list
>> Lazarus@lists.lazarus.freepascal.org
>> http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
>>
>>
> 

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


[Lazarus] Lazarus 1.2.6 IDE Docking Broken

2014-11-26 Thread m...@rpzdesign.com
I tried to use Lazarus 1.2.6 and Lazarus 1.2.4 on WIndows 8.1 x64.

Installed the 386 version of Lazarus/Freepascal.

When I tried to use the AnchorDockingDesign 0.5, 0.6 packages for the
IDE, the editor dies.

Does not occur on Linux from what I can tell.

An attached screen shot in included.

Cheers,

md




--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] OI Checkboxes

2014-11-26 Thread Bart
On 11/26/14, Vojtěch Čihák  wrote:

> I considered other solution. Create a new simple visual component
> (TCheckBoxThemed or so). It will have class method:
> class procedure PaintSelf(ACanvas: TCanvas; AChecked: Boolean);

TCheckBoxEx (like we have TComboBoxEx) could the also implement
Alignment: TLeftRight for all widgetsets (currently only Windows
natively supports it), see
http://bugs.freepascal.org/view.php?id=12343

Bart

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] OI Checkboxes

2014-11-26 Thread Vojtěch Čihák

I considered other solution. Create a new simple visual component 
(TCheckBoxThemed or so). It will have class method:
class procedure PaintSelf(ACanvas: TCanvas; AChecked: Boolean);
 
used for non-selected rows and it will behave like normal checkbox in selected 
rows.
I will guarantee the same look without bunch of {$IFDEF}s.
 
The component would be TCustomControl derived, with very basic functionality 
(click, keydown, bidimode, property Checked).
I guess 300 lines incl. declaration. 
__

Od: Juha Manninen 
Komu: Lazarus mailing list 
Datum: 26.11.2014 08:42
Předmět: Re: [Lazarus] OI Checkboxes


On Tuesday, November 25, 2014, Vojtěch Čihák > wrote:
If so, then it will never work properly.
It may never be perfect but it can be very close.I wrapped my mind around this 
issue last night and improved it a lot.Please test.Juha

--

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus 


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Editor key-strokes

2014-11-26 Thread Péter Gábor
I think that you problem is not Key Options related,
take a look at:
Tools --> Options --> Editor --> Overwrite block

It is checked here.

2014-11-26 13:50 keltezéssel, m...@rpzdesign.com írta:
> How does someone set the delete key in Key Options to both delete the
> char at the position in the editor AND ALSO delete the highlighted block.
> 
> Seems a bit strange that the delete key could not both: "Delete Block"
> and "Delete char at cursor"
> 
> Normally, hitting the delete key will remove code at the cursor.  THen
> when you select a block of text, delete will remove it.
> 
> No so with the lazarus editor.  Or am I wrong?
> 
> Anybody have any ideas?
> 
> How do you set this up.
> 
> Seems a bit crazy that there is no "Save key mapping to file" option,
> but pre-canned schemes that nobody can modify and save with their own
> preferences.
> 
> Cheers,
> 
> md
> 
> 
> 
> 
> --
> ___
> Lazarus mailing list
> Lazarus@lists.lazarus.freepascal.org
> http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
> 
> 

-- 
Péter Gábor
p...@freemail.hu

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


[Lazarus] Editor key-strokes

2014-11-26 Thread m...@rpzdesign.com
How does someone set the delete key in Key Options to both delete the
char at the position in the editor AND ALSO delete the highlighted block.

Seems a bit strange that the delete key could not both: "Delete Block"
and "Delete char at cursor"

Normally, hitting the delete key will remove code at the cursor.  THen
when you select a block of text, delete will remove it.

No so with the lazarus editor.  Or am I wrong?

Anybody have any ideas?

How do you set this up.

Seems a bit crazy that there is no "Save key mapping to file" option,
but pre-canned schemes that nobody can modify and save with their own
preferences.

Cheers,

md




--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] UTF8 RTL for Windows

2014-11-26 Thread Michael Schnell

On 11/25/2014 09:39 PM, Hans-Peter Diettrich wrote:


The Delphi model already broke that claimed type safety, by omitting 
conversions of RawByteString results, for speed optimization. That's 
dangerous, because the compiler can *only* check the static type of 
string variables, but not the dynamic encoding of their contents
This was clear to me just after exploring and understanding encoded 
strings in Delphi. In FPC/Lazarus we now have a *chance* for 
simplifications and improvements, when the new features are used in 
the *right* way.


On that behalf I just posted a set of questions on the "FPC Unicode 
support" wiki page in the fpc-devel mailing list. Please continue this 
discussion there.



But many arguments and opinions, presented in this thread, indicate to 
me an yet incomplete understanding and many misunderstandings, which I 
actually try to spot. 


See the new wiki page 
http://wiki.freepascal.org/not_Delphi_compatible_enhancement_for_Unicode_Support


-Michael

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] OI Checkboxes

2014-11-26 Thread FreeMan
I tested r46993. Square Top is okey, I mean selected and Unselected row 
is okey, not moving.
But left margins, Squares and text move together, left and right. They 
been couple dancer now :)



I'm writing Just let you know, I'm NOT telling fix this. Please don't 
miss understand me.



On 26-11-2014 11:36, Juha Manninen wrote:

This is a difficult one. The left position depends on widgetset and theme etc.
I don't know if there is any way to get the real value.
Now I have made a compromise which I believe looks good more often
than the other values would. I already had that value earlier as a
IFDEF hack for GTK2.
Please test.

Juha


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] OI Checkboxes

2014-11-26 Thread Juha Manninen
On Wed, Nov 26, 2014 at 10:47 AM, FreeMan  wrote:
> Thank you Juha, been good job.
> I tested in kubuntu 14.04, QT widgetset, lazarus r46991 checkbox square not
> dancing now :) but text comes 2 pixcels to left when row selected.

This is a difficult one. The left position depends on widgetset and theme etc.
I don't know if there is any way to get the real value.
Now I have made a compromise which I believe looks good more often
than the other values would. I already had that value earlier as a
IFDEF hack for GTK2.
Please test.

Juha

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] OI Checkboxes

2014-11-26 Thread FreeMan

Thank you Juha, been good job.
I tested in kubuntu 14.04, QT widgetset, lazarus r46991 checkbox square 
not dancing now :) but text comes 2 pixcels to left when row selected.


On 26-11-2014 09:41, Juha Manninen wrote:

It may never be perfect but it can be very close.
I wrapped my mind around this issue last night and improved it a lot.
Please test.

Juha




--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus