midora Posted February 14, 2021 Author Share Posted February 14, 2021 @toe_head2001Could you provide the two simple dlls with the new Bitmap and the source surface? Just to see if I'm getting the same issues. Quote Link to comment Share on other sites More sharing options...
toe_head2001 Posted February 14, 2021 Share Posted February 14, 2021 18 hours ago, midora said: Could you provide the two simple dlls with the new Bitmap and the source surface? Here you go. I've named the files as OblTestBitmap.dll and OblTestSurface.dll. OblTest.zip Quote My Gallery | My Plugin Pack Layman's Guide to CodeLab Link to comment Share on other sites More sharing options...
Reptillian Posted February 15, 2021 Share Posted February 15, 2021 (edited) For future reference: I want to ask though, and I think the answer is no, but does OptionBasedLibrary supports dynamic gui? As in I'm able to hide UI elements or based on variables equation? It's the hiding part I want, not unselect-able. For example: Spoiler u "{$1}"\ "{$2}"\ "{$3}"\ "{$4}"\ "{$5}"\ "{$6}"\ "{$7}"\ "{$8}"\ "{$9}"\ "{$10}"\ "{$11}"\ "{$12}_"{$10==1?2:0}\ "{$13}_"{$10==2?2:0}\ "{$14}_"{(($10==3)||($10==4))?2:0}\ "{$15}_"{(($10==3)||($10==4))?2:0} From $1 to $15 brackets (inside brackets are variables used by a filter.) are individual gui elements, and the _{$expression} is the conditions to hide elements. This, but in OptionBasedLibrary C# form. 0 means hidden, 1 means unselectable (not hidden), and 2 means visible and selectable. Edited February 15, 2021 by Reptillian Quote G'MIC Filter Developer Link to comment Share on other sites More sharing options...
midora Posted February 15, 2021 Author Share Posted February 15, 2021 6 hours ago, toe_head2001 said: Here you go. I've named the files as OblTestBitmap.dll and OblTestSurface.dll. You missed the .dlcs but empty ones are working fine. 😉 I'm getting exactly the same issues. No idea in the moment but I will check... Quote Link to comment Share on other sites More sharing options...
midora Posted February 15, 2021 Author Share Posted February 15, 2021 23 minutes ago, Reptillian said: For future reference: I take it as this. We will discuss it later. In the moment you can just enable/disable OptionControls via the UI but you can not hide them. Hiding would require to update the layout. You may derive your own Optioncontrols and maybe a PerformLayout of the dialog works. No idea in the moment. Quote Link to comment Share on other sites More sharing options...
midora Posted February 15, 2021 Author Share Posted February 15, 2021 (edited) On 2/15/2021 at 12:19 AM, toe_head2001 said: Here you go. I've named the files as OblTestBitmap.dll and OblTestSurface.dll. I recreated the first one and it works. No idea what's the issue. I would expect that all these bitmap calls return null. Maybe an issue with the pdn dlls? I'm still referencing 3.5.11. I attached the solution. The referenced dlls are in the Release folder. Maybe just try TestEffect.dll first if you like. Edited November 3, 2021 by midora Quote Link to comment Share on other sites More sharing options...
NSD Posted February 15, 2021 Share Posted February 15, 2021 The issue is here: protected override ConfigurationOfUI OnCustomizeUI() { //the issue is PropertyBasedLook = true //return new ConfigurationOfUI { PropertyBasedLook = true }; return new ConfigurationOfUI(); } 1 Quote Link to comment Share on other sites More sharing options...
midora Posted February 15, 2021 Author Share Posted February 15, 2021 @NSDYou are right (at least I'm getting this quite tiny rectangle). I have a rough idea about the intention of this flag but I'm sure it's more than these 5 years that I tested if it works). In the moment I would say just don't set it to true. I'm not sure that I will support it in the future. Maybe it would be better to remove it completely from the code, Just no time to run tests for all these cases. difficult enough to test if it works on Win7 with and without Aero. Will add a warning on the first page. Thanks all for looking in this issue. Quote Link to comment Share on other sites More sharing options...
midora Posted March 8, 2021 Author Share Posted March 8, 2021 Related to the topic PropertyBased UI: All PropertyBased Controls, I like to show the differences between PropertyBased and OptionBased Controls. Just focused on the same set of controls. Enabled Disabled The main differences between OptionBased and ProperyBased are (in Dark Theme) the focus rectangle is white and not black the background of disabled textboxes and numeric boxes stays dark 1 Quote Link to comment Share on other sites More sharing options...
midora Posted March 10, 2021 Author Share Posted March 10, 2021 I worked a bit on the HelpButton implementation. Beside of the possibilities to show an alert or a help window I decided to add the classic balloon help support. This works in the way that you are clicking the help button and the cursor changes to an arrow with an question mark. Clicking an options shows the balloon help. As always in OBL dll the help text is defined (and can be translated) in the dlc file. You will also getting the help ballon by pressing F1 if one element in an OptionControl has the focus. The title of the Balloon is the DisplayName The implementation was easy. You just have to override the OnHelpRequest method and show the balloon there. I tried HelpProvider class first but it is buggy and somehow clamped to the mainscreen. Quote Link to comment Share on other sites More sharing options...
midora Posted March 10, 2021 Author Share Posted March 10, 2021 I remember discussions why it is not a good idea to save and restore the position of the effect dialogs. The main argument was that it may happen that the dialog is no longer visible after a reconfiguration of the screens. This would raise support issues. OBL dialogs are saving/restoring the position but there is a mechanism implemented which checks that the caption of the dialog is always visible on a screen. The following snippet shows how it works form.Location = CatchBoundsToScreens(rememberedBounds).Location; /// <summary> /// Catches the location of the rectangle to the screen containing the /// largest portion of the rectangle. If no screen contains the rectangle /// the main screen will be used. /// </summary> /// <param name="bounds">Typically the bounds of a Form.</param> /// <returns>The catched rectangle.</returns> private Rectangle CatchBoundsToScreens(Rectangle bounds) { // Retrieves a Screen for the display that contains the largest portion of the rectangle. var screen = Screen.FromRectangle(bounds); // we catch first bottom/right and after top/left if (bounds.Right > screen.Bounds.Right) bounds.X = screen.Bounds.Right - bounds.Width; if (bounds.Bottom > screen.Bounds.Bottom) bounds.Y = screen.Bounds.Bottom - bounds.Height; if (bounds.Left < screen.Bounds.Left) bounds.X = screen.Bounds.Left; if (bounds.Top < screen.Bounds.Left) bounds.Y = screen.Bounds.Top; return bounds; } Quote Link to comment Share on other sites More sharing options...
midora Posted April 8, 2021 Author Share Posted April 8, 2021 Still working on refactoring of OBL to get a consistent interface for users an developers... There is a new OptionControl flag 'ReverseControlOrder' (and the same for the default UI configuration) to change the order of the sub controls. This is mostly useful if 'DisplayLabel' (old name 'Label') is used for an Optioncontrol because the NUD value is then next to the DisplayLabel (like for all the other OptionControls not showing NUDs). The screenshot on the right uses 'ReverseControlOrder'. What I really don't like are the blue thumbs on the sliders (which turns to black on hovering the thumb). It should be vice versa (especially in dark mode). But I'm not sure that I can change this. I also changed the default formatting if NUDs to use (ThousandsSeparator ? "#,##0." : "0.") + new string('#', DecimalPlaces), CultureInfo.CurrentCulture which allows the ThousandsSeparator and suppresses trailing zeros (not visible in the screenshot because I just changed it). I'm not sure if I should add a flag for this formatting. Quote Link to comment Share on other sites More sharing options...
midora Posted April 10, 2021 Author Share Posted April 10, 2021 Thanks to the Native TrackBar control it wasn't too difficult to change the appearance of the sliders in the different states. Hope you like it more than the old blue one provided from .net TrackBar. 'Hot' means the mouse hovers the slider thumb, 'Pressed' the user moves the thumb with the mouse. In 'normal' mode the thumb shows always the BackColor. If the controls shows tick marks then the thumb outline will be .pointing to the ticks bar. Also added the default value marker. 1 1 Quote Link to comment Share on other sites More sharing options...
midora Posted May 16, 2021 Author Share Posted May 16, 2021 If people like @BoltBait and @Ego Eram Reputo think it is a mess to use OBL then there is the general question whether it makes sense to continue the development or not. It's not a big loss for me to stop the paint.net variant because I'm using most components of the lib for other applications. I just don't like to spend time if I have to fight against others in the forum. So what do you think? 1 Quote Link to comment Share on other sites More sharing options...
Reptillian Posted May 16, 2021 Share Posted May 16, 2021 (edited) I did wanted to completely convert gmic thorn fractal as a gmic-pdn obl plugin. Particularly the problem of dynamic gui would be solved with tabs. I'm not going to stop you, but there are others that see a use in this. Does anyone else have a suggestion to this problem? That filter use dynamic gui, and it is apparent when using custom formula. The current pdn thorn fractal lacks it because of inherent limitations of static gui. Edited May 16, 2021 by Reptillian Quote G'MIC Filter Developer Link to comment Share on other sites More sharing options...
NSD Posted May 16, 2021 Share Posted May 16, 2021 I understand that you were upset by BB's statement, but I think OBL is very useful. Please don't stop developing it. Just put all the information about OBL so that no such misunderstandings occur. 1 Quote Link to comment Share on other sites More sharing options...
toe_head2001 Posted May 16, 2021 Share Posted May 16, 2021 9 hours ago, midora said: ... then there is the general question whether it makes sense to continue the development or not. Yes, continue to develop it. There are plenty of other people who are willing to use it. 9 hours ago, midora said: I just don't like to spend time if I have to fight against others in the forum. You don't need to fight anyone. Everyone is entitled to have their own personal opinion. No one is saying you have to agree with someone else's opinion. Quote My Gallery | My Plugin Pack Layman's Guide to CodeLab Link to comment Share on other sites More sharing options...
BoltBait Posted May 16, 2021 Share Posted May 16, 2021 Please continue development. I would actually like to see some of the capabilities built-in to Paint.NET, like tabs. Perhaps you could work with Rick to port some of your code directly into Paint.NET so people like me could enjoy tabs and other things. 1 Quote Click to play: Download: BoltBait's Plugin Pack | CodeLab | and how about a Computer Dominos Game Link to comment Share on other sites More sharing options...
Ego Eram Reputo Posted May 16, 2021 Share Posted May 16, 2021 12 hours ago, midora said: If people like @BoltBait and @Ego Eram Reputo think it is a mess to use OBL Wait. What? I'm all for you continuing to develop OBL. My one wish is that the support files are integrated in a single DLL for publication. That would standardize installation and we wouldn't have the whole versioning nightmare we seem to be rushing towards. Quote ebook: Mastering Paint.NET | resources: Plugin Index | Stereogram Tut | proud supporter of Codelab plugins: EER's Plugin Pack | Planetoid | StickMan | WhichSymbol+ | Dr Scott's Markup Renderer | CSV Filetype | dwarf horde plugins: Plugin Browser | ShapeMaker Link to comment Share on other sites More sharing options...
Rick Brewster Posted May 17, 2021 Share Posted May 17, 2021 There is most likely a way to ensure that the OBL can be placed not in the paint.net root. 6 hours ago, Ego Eram Reputo said: My one wish is that the support files are integrated in a single DLL for publication. That would standardize installation and we wouldn't have the whole versioning nightmare we seem to be rushing towards. This may be more feasible with the migration to .NET Core. I'll be able to look into this ... later Linking and trimming are part of what .NET Core provides support for, at least for the app/exe, I'm just not sure if DLLs (libraries) can also do it. I don't see why not though ... Quote The Paint.NET Blog: https://blog.getpaint.net/ Donations are always appreciated! https://www.getpaint.net/donate.html Link to comment Share on other sites More sharing options...
midora Posted October 8, 2021 Author Share Posted October 8, 2021 I'm not angry about the 4.3 rules, each developer can decide about its own product. But because there is no solution to use shared libraries it makes no sense to continue the development of OBL as a shared library. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.