| [ Return to Bugs & Features | Roadmap 1.3 | SVN ⇄ GIT ]
STR #3076
Application: | FLTK Library |
Status: | 1 - Closed w/Resolution |
Priority: | 1 - Request for Enhancement, e.g. asking for a feature |
Scope: | 3 - Applies to all machines and operating systems |
Subsystem: | Core Library |
Summary: | Can't set align for tabs |
Version: | 1.3-feature |
Created By: | Belgiansteve |
Assigned To: | AlbrechtS |
Fix Version: | 1.4.0 (SVN: v12185) |
Update Notification: | |
Trouble Report Files:
Trouble Report Comments:
|
#1 | Belgiansteve 10:22 Apr 30, 2014 |
| Hi, It appears that tabs are drawn with the FL_ALIGN_CENTER alignment and this cannot be changed. This is unfortunate since I want to use FL_ALIGN_IMAGE_NEXT_TO_TEXT so it would draw the icon next to the label (as is seen in many modern GUI's, e.g. VS10). Can this feature be implemented! Thanks! | |
|
#2 | Belgiansteve 11:21 May 01, 2014 |
| Apparently, I've already requested this in the past (STR 2949), but never got a response :(. Sorry for the duplicate request. | |
|
#3 | AlbrechtS 16:25 Sep 18, 2014 |
| Yes, we are a small group, and in the last months we may have been slow. I hope we'll get 1.3.3 out soon, so feature requests will have to wait some more time - sorry for the inconveniencies.
We appreciate patches though (diff -u or similar), and patches can speed up our development of new features and bug fixes. If you send a patch, please do also post a small, compileable test program, so we can test the feature.
I closed the duplicate STR # 2949. | |
|
#4 | Teklad 00:17 Sep 23, 2016 |
| Figured I would take a crack at this. I implemented what I "think" the alignment of the label should look like within the tab.
It compensates for the image width automagically when creating new tabs, which seems to go pretty smoothly.
I've uploaded the diff and a little demo file to test out.
Should compile with: g++ `fltk-config --cxxflags` main.cxx Fl_Tabs.cxx `fltk-config --ldflags`
Might need to modify the header just slightly if compiling all in the same directory though. | |
|
#5 | AlbrechtS 09:41 Mar 06, 2017 |
| Fixed in Subversion repository.
@Teklad: thanks for the patch and the demo program. I extended your demo slightly ;-) so I could test more features. I fixed the label measurement elsewhere in the library so the compensation for the image width is no longer necessary. I also renamed your method name to tab_align() because we have align() for widgets which is similar. Don't method names don't include the word 'label' so I believe this is short and consistent.
FWIW: I'm uploading my modified test program for later reference, see tab_align.cxx. There are still some issues with label drawing, particularly if there are Fl_Windows children with images, but this will be resolved separately.
@Belgiansteve: thanks again for the report and sorry for the long delay. I hope that svn r12185 (FLTK 1.4-current/svn) fixes the problem for you. Please confirm so I can close this STR. TIA. | |
|
#6 | AlbrechtS 09:43 Mar 06, 2017 |
| Correction: "Don't method names don't include ..." should read "Both method names don't include ...". Sorry for the noise. | |
|
#7 | AlbrechtS 10:51 Nov 18, 2017 |
| This STR has not been updated by the submitter for two or more weeks and has been closed as required by the FLTK Configuration Management Plan. If the issue still requires resolution, please re-submit a new STR. | |
[ Return to Bugs & Features ]
|
| |