Recent

Author Topic: LAMW: jSpinner down arrow  (Read 2300 times)

c4p

  • Full Member
  • ***
  • Posts: 158
LAMW: jSpinner down arrow
« on: November 06, 2021, 12:22:48 am »
Returning to Lazarus/LAMW after a hiatus and can see great progress that has been made with LAMW, very well done!

I did notice that the jSpinner doesn't seem to flip the down arrow contrast when the DropListBackgroundColor is set to colbrBlack (arrow should be white?), as the arrow is no longer visible, as it is already statically set to black or dark grey? which makes it looks like an Edit box when the app is running.
I have a Panel background set to black with a jSpinner on it and the DropListBackgroundColor set to Black which results in no down arrow being visible, hope this makes sense. Wish I could fix this myself.

Although this may be just me, when I try and assign a custom color say on BackgroundColor using jEditText, jAutoviewText etc. it seems to select the nearest color rather than the custom RGB set, this seems to be the case across LAMW, I need this to set my jEditText/jAutoTextView to a slightly off Black colour to blend better rather than one of the fixed colors. Custom color seems to work/assign OK in FCL. This is not the end of the world for me, but would be a nice to have, but may be like this by design in LAMW.

Thanks in advance for assistance.
« Last Edit: November 06, 2021, 01:37:18 pm by c4p »
Lazarus 2.0.12 r64642/FPC 3.2.0 LAMW v0.8.6.4 on Windows 10+Linux Mint 21.2, projects mainly built using AppCompat and Gradle v8.5

c4p

  • Full Member
  • ***
  • Posts: 158
Re: LAMW: jSpinner down arrow
« Reply #1 on: November 09, 2021, 12:43:17 am »
 :'(
Lazarus 2.0.12 r64642/FPC 3.2.0 LAMW v0.8.6.4 on Windows 10+Linux Mint 21.2, projects mainly built using AppCompat and Gradle v8.5

jmpessoa

  • Hero Member
  • *****
  • Posts: 2302
Re: LAMW: jSpinner down arrow
« Reply #2 on: November 09, 2021, 04:02:17 am »

Hi, c4p!

Sorry....

Soon I will try some solution as soon as my "master" computer comes back from a repair.

Lamw: Lazarus Android Module Wizard
https://github.com/jmpessoa/lazandroidmodulewizard

c4p

  • Full Member
  • ***
  • Posts: 158
Re: LAMW: jSpinner down arrow
« Reply #3 on: November 09, 2021, 11:18:33 pm »
Sorry to hear about your computer issues jmpessoa.
Lazarus 2.0.12 r64642/FPC 3.2.0 LAMW v0.8.6.4 on Windows 10+Linux Mint 21.2, projects mainly built using AppCompat and Gradle v8.5

jmpessoa

  • Hero Member
  • *****
  • Posts: 2302
Re: LAMW: jSpinner down arrow
« Reply #4 on: November 15, 2021, 07:00:38 am »
Hi!

My "master" computer comes back from repair !!!! :D :D

Quote
I did notice that the jSpinner doesn't seem to flip the down arrow contrast when the DropListBackgroundColor is set to colbrBlack (arrow should be white?), as the arrow is no longer visible,

New! You can try:
Code: Pascal  [Select][+][-]
  1. procedure TAndroidModule1.AndroidModule1JNIPrompt(Sender: TObject);
  2. begin
  3.    jSpinner1.SetColorFilter(colbrBlue);  //or other color....
  4. end;
  5.  
Lamw: Lazarus Android Module Wizard
https://github.com/jmpessoa/lazandroidmodulewizard

c4p

  • Full Member
  • ***
  • Posts: 158
Re: LAMW: jSpinner down arrow
« Reply #5 on: November 15, 2021, 08:40:11 am »
Excellent, I will try this tonight.  :)

Hi!

My "master" computer comes back from repair !!!! :D :D

Quote
I did notice that the jSpinner doesn't seem to flip the down arrow contrast when the DropListBackgroundColor is set to colbrBlack (arrow should be white?), as the arrow is no longer visible,

New! You can try:
Code: Pascal  [Select][+][-]
  1. procedure TAndroidModule1.AndroidModule1JNIPrompt(Sender: TObject);
  2. begin
  3.    jSpinner1.SetColorFilter(colbrBlue);  //or other color....
  4. end;
  5.  
Lazarus 2.0.12 r64642/FPC 3.2.0 LAMW v0.8.6.4 on Windows 10+Linux Mint 21.2, projects mainly built using AppCompat and Gradle v8.5

jmpessoa

  • Hero Member
  • *****
  • Posts: 2302
Re: LAMW: jSpinner down arrow
« Reply #6 on: November 15, 2021, 07:28:05 pm »
Quote
when I try and assign a custom color say on BackgroundColor using jEditText, jAutoviewText etc. it seems to select the nearest color rather than the custom RGB set, this seems to be the case across LAMW, I need this to set my jEditText/jAutoTextView to a slightly off Black colour to blend better rather than one of the fixed colors.

about:

https://forum.lazarus.freepascal.org/index.php/topic,38482.msg261437.html#msg261437


A very simple solution:
Code: Pascal  [Select][+][-]
  1. //https://coderwall.com/p/dedqca/argb-colors-in-android
  2. //https://stackoverflow.com/questions/5445085/understanding-colors-on-android-six-characters/25170174#25170174
  3. {
  4. AA - Alpha component [0..255] of the color
  5. RR - Red component [0..255] of the color
  6. GG - Green component [0..255] of the color
  7. BB - Blue component [0..255] of the color
  8. }
  9. //https://www.rapidtables.com/web/color/RGB_Color.html
  10. procedure TAndroidModule1.jButton1Click(Sender: TObject);
  11. begin
  12.  
  13.    jTextView1.CustomColor:= $FFA0C456;
  14.    jTextView1.FontColor:= colbrCustom;
  15.  
  16.    jPanel1.CustomColor:= $FFE5FFFF;
  17.    jPanel1.BackgroundColor:= colbrCustom;
  18.  
  19.  
  20.    jEditText1.CustomColor:= $FFC49C56;
  21.    jEditText1.FontColor:= colbrCustom;
  22.  
  23.  
  24.    jButton1.CustomColor:= $FFC49C56;
  25.    jButton1.BackgroundColor:=colbrCustom;
  26.  
  27.    jButton1.CustomColor:= $FFA0C456;
  28.    jButton1.FontColor:= colbrCustom;
  29. end;  
  30.  
« Last Edit: November 15, 2021, 09:27:11 pm by jmpessoa »
Lamw: Lazarus Android Module Wizard
https://github.com/jmpessoa/lazandroidmodulewizard

c4p

  • Full Member
  • ***
  • Posts: 158
Re: LAMW: jSpinner down arrow
« Reply #7 on: November 15, 2021, 09:40:20 pm »
Ah yes, just didn't set the custom color in the GUI.

Quote
when I try and assign a custom color say on BackgroundColor using jEditText, jAutoviewText etc. it seems to select the nearest color rather than the custom RGB set, this seems to be the case across LAMW, I need this to set my jEditText/jAutoTextView to a slightly off Black colour to blend better rather than one of the fixed colors.

about:

https://forum.lazarus.freepascal.org/index.php/topic,38482.msg261437.html#msg261437


A very simple solution:
Code: Pascal  [Select][+][-]
  1. //https://coderwall.com/p/dedqca/argb-colors-in-android
  2. //https://stackoverflow.com/questions/5445085/understanding-colors-on-android-six-characters/25170174#25170174
  3. {
  4. AA - Alpha component [0..255] of the color
  5. RR - Red component [0..255] of the color
  6. GG - Green component [0..255] of the color
  7. BB - Blue component [0..255] of the color
  8. }
  9. //https://www.rapidtables.com/web/color/RGB_Color.html
  10. procedure TAndroidModule1.jButton1Click(Sender: TObject);
  11. begin
  12.  
  13.    jTextView1.CustomColor:= $FFA0C456;
  14.    jTextView1.FontColor:= colbrCustom;
  15.  
  16.    jPanel1.CustomColor:= $FFE5FFFF;
  17.    jPanel1.BackgroundColor:= colbrCustom;
  18.  
  19.  
  20.    jEditText1.CustomColor:= $FFC49C56;
  21.    jEditText1.FontColor:= colbrCustom;
  22.  
  23.  
  24.    jButton1.CustomColor:= $FFC49C56;
  25.    jButton1.BackgroundColor:=colbrCustom;
  26.  
  27.    jButton1.CustomColor:= $FFA0C456;
  28.    jButton1.FontColor:= colbrCustom;
  29. end;  
  30.  
Lazarus 2.0.12 r64642/FPC 3.2.0 LAMW v0.8.6.4 on Windows 10+Linux Mint 21.2, projects mainly built using AppCompat and Gradle v8.5

 

TinyPortal © 2005-2018