Within the View RCP , I'm trying to figure out how to modify or hide the standard 1-pixel black border around each view, or if it's even possible. Anybody know how?
The view is created using standard rcp viewpart extension
Any help or pointers will be helpful
Thanks
You can remove the border around the views if you modifiy the view's parent layout in ViewPart#createPartControl in one of your views like this:
public void createPartControl(Composite parent) {
Composite view_parent = parent.getParent().getParent().getParent();
StackLayout stack_layout = (StackLayout) view_parent.getLayout();
stack_layout.marginHeight = -1;
stack_layout.marginWidth = -1;
// Your code
}
After that you should set the views attributes:
standalone to true
showTitle to false
Unfortunately the border of the "resizer" between the views is still there. If I find a solution for that I will update my answer.
Note: If you have just one view, everything looks nice.
Related
I am working on a text editor app that needs an inspector sidebar for special actions with the text. I am therefore using an NSSplitViewController to manage the overall layout. I want the sidebar to take advantage of macOS' new full-height sidebars. I already have an NSWindow with a fullSizeContentView style mask. And my corresponding NSSplitViewItem has the property allowsFullHeightLayout set to true.
Unfortunately, I am still getting this layout:
Additional information:
The Inspector sidebar is an NSHostingView with a SwiftUI View wrapped inside.
When using the accessibility inspector, I can see that the sidebar layout is expanded all the way up, but the NSToolbar seems to be ignoring it.
I need to keep both the title and toolbar
It is possible to let the toolbar know that there's a split view divider by using a special NSToolbarItem. By creating a custom identifier and rendering it as an NSTrackingSeparatorToolbarItem, I was able to extend the line all the way up.
To make the inspector view background extend to full height layout, I had to use window.titlebarAppearsTransparent = true.
This blogpost helped me to figure out everything: https://christiangiacomi.com/posts/setup-nstrackingseparatortoolbaritem-macos11/
I have some trouble when I arrange my javafx layout. I use BorderPane. Top and Left area are for static view (page). I placed MenuBar on the Top, and some Buttons on the Left, like in the picture. And, when I click a Button, the content will be opened in the center. Every Button has different content and layout. "Money Box" button will have TabPane for its content, and I have created it using SceneBuilder. "Cafe" button will have Table for its content, and I have created it using SceneBuilder. What strategy, or what do I have to do for solving my problem here.
[img]http://i.imgur.com/fG6a0kg.png[/img]
I am not 100% sure what exactly you are looking for, and based on your description there are many ways to accomplish what you need. I have a similar behavior that we use different FXMLs for each selected layout and load those and remove those from the scene.
private void openMiddleNode(String view) {}
try {
FXMLLoader loader = new FXMLLoader();
Parent node = loader.load(getClass().getClassLoader().getResource(view).openStream());
//If your middle section has it's own controller (likely an instance variable, if it needs to respond to events from the parent controller)
MyController controller = loader.getController();
controller.anyCustomSetup();
//Assumes that this middlePane is defined in the FXML and initialized above
middlePane.getChildren().setAll(node);
} catch (IOException ie){
if(logger.isErrorEnabled()){
logger.error("An exception has been thrown: " + ie);
}
}
}
within part stack, i have part views. , and each view has minimize/maximize buttons,
Is there is any way i can hide minimize/maximize buttons for some particular view part ?
This is a bug in e4:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=394231
There are two different ways to work around this:
Remove this dependency org.eclipse.e4.ui.workbench.addons.swt
Use this CSS-snippet:
.MPartStack {
swt-maximize-visible: false;
swt-minimize-visible: false;
}
But there is another bug if you apply rule as below:
.MPartStack {
swt-maximize-visible: true;
swt-minimize-visible: false;
}
Initially "Minimize" button is hidden.
If you maximize a part stack, now "Minimize" button is visible and you can really minimize the part stack.
MinMaxAddon#setCTFButtons(..) does not respect what css rule said, which always reveal the "Minimize" button for maximized part stack.
I've managed to change the navBar tint, the background color and labels' color using this.
But is it possible to change the icons' color?
(those left to tableview's labels)
Thanks!
I don't know of a way to change the icon colors, but I don't really think all this hacking is necessary anyway - Apple certainly doesn't recommend it.
As far as I can tell, there is nothing special about the moreViewController, apart from being hard to customize. If it were me, I'd simply create my own custom viewcontroller, say MoreViewController, as a subclass of UITableViewController, add it to a NavigationController and then add that as the fifth and last item in the TabBarController. This table would then have a cell for each additional viewcontroller that I'd like to show. Then I'd be free to customize these cells to my heart's content.
This is an old question, nevertheless I'll post a fairly reasonable solution I found.
I first tried setting the global tint color to what I wanted, but that didn't work. Luckily, simply changing the tint color of the table view did work. Adapting code from here:
let color: UIColor
// ...
if let moreTableView = moreNavigationController.topViewController?.view as? UITableView {
moreTableView.tintColor = color
}
This still doesn't seem to affect the edit view controller, however.
EDIT:
There is actually a simpler way to do both, see this answer.
I am working on a GUI in Interface Builder for an iPhone app.
In my view controller, I would like to have a toolbar at the top and then some controls (i.e. a view) that are centralized in the lower portion of the view.
The problem that I am having is that I want things to be centralized in the area below the toolbar but the whole screen size (including the toolbar) is being used when centralizing.
Any ideas how to effectively achieve this type of layout - it must be pretty common but I haven't found anything yet.
Thanks,
Alan
You might want to try putting all your control area below the toolbar in a separate subview, since that subview might do what you want as it resizes.