Controlling cell width in RStudio Environment tab data viewer - r

I am using the latest version of RStudio on Mac (1.2.1070). When viewing a data frame in the Environment tab, the cell widths are very wide, seemingly as wide as the data contained. This makes it hard to use with large text blocks. Is there a way to control the default width of cells or to set a max default width, other than by manually dragging using the mouse?
I think this behaviour is recent, and only in the latest release of RStudio.

In RStudio\resources\grid folder, locate dtstyles.css file, look for .textCell there should be several. Find the one contains max-width: 300px; and change the number. See if it works.

Related

Side-by-side NSTableView using StackView and Constraints

I am creating an app for macOS using XIB and Swift, XCode 12.5. What I would like to achieve is a window with two NSTableViews side-by-side, having equal widths, filling the available space. A Stack View seems the obvious choice here.
I am easily able to use constraints to make a single NSTableView fill a window and resize correctly, but my difficulty is having two side-by-side NSTableViews. I've tried everything I can think of, but the symptom is always roughly the same: in Interface Builder, expanding the window, the NSTableViews grow (equally, correctly) but shrinking the window they remain at their previous maximum size.
Running this app gives a different result: the tables do actually resize correctly, but the cell sizes are out of whack. These tables are (should be) identical copies of one another: I literally copy-pasted the second one.
I have searched for information about using NSTableView inside Stack Views, but have come up empty-handed. I have probably overlooked something! I should add that I'm happy to move to Storyboard or even SwiftUI if it means being able to solve my problem, but it looks as if SwiftUI and NSTableView will complicate the matter.
I have tried to show my work here: https://github.com/toothbrush/tabletest2.

QGRID: Is it possible to enable a left-right scrollbar when displayed in Jupyter notebook?

I checked the qgrid documentation, which is based on the SlickGrid library. The SlickGrid grid options do not show something. However it seems odd that a web based library would not allow scrolling left or right if all of the data does not fit within the current view. As you can see below, my dataframe has 95 columns and only 10 are visible, with no scrollbar top access the other ones.
thx

Eclipse Neon: unable to hide min/max button row in split pane editor layout

Getting started with Eclipse Neon.
Pleasantly surprised to see that we can now recapture nearly all wasted space from the UI with little effort.
For example, Gtk 3.20 (on Linux) streamlines scrollbars and gutters to the point where there's no longer a need to create a custom plugin to hide space-wasting elements. To hide entire toolbar row, just a click away: Window > Appearance > Hide ToolBar. Bottom status bar? Just define override attribs and import custom css file into target theme a la #import('custom_gtk.css'):
#org-eclipse-ui-trim-status,
#org-eclipse-ui-trim-vertical2,
#org-eclipse-ui-main-toolbar {
visibility: hidden;
}
There is, however, one issue I have been unable to workaround via custom css: in split editor layouts a separate top row appears with min/max buttons. The row serves no purpose since max button is not attached to any editor panel file (i.e. clicking max button does nothing). The end result is 20-30px of wasted vertical space.
Have tried various override incantations using CSS Spy, but none have worked. Would love to find a solution to this problem as out of the box space preserving VIM-like editing is nearly at hand in Neon.
Here's E4 Bugzilla tracker issue (generally not much activity there so trying SO in hopes of finding a solution or possible workarounds).
This is a bit heavy handed but does the trick. In my eclipse plugins/org.eclipse.ui.theme.../css directory I have a custom_gtk.css file with, among other overrides, the following:
CTabFolder {
swt-maximize-visible: false;
swt-minimize-visible: false
}
Hides all min/max elements and the extraenous row in which the elements are defined (if editor tabs exist then the row remains, only min/max buttons are hidden).

How to avoid adding excess 1 pixel spacing by Qt Designer

I'm working on application for embedded and we have 256x64 grayscale screen. Qt 5.3 perfectly renders on that screen with -platform linuxfb option. Obviously, we save every pixel of space, so I faced with trouble: Qt Designer adds excess 1 pixel spacing for every layout element deeper in hierarchy. So they accumulate for the most deep widgets. More precisely, for some reason child element of layout components gets coordinates (1,1) relative to parent. So, it's true for every widget except for root widget. Picture below demonstrates accumulated spacings (thin and thick red lines), and (1,1) coordinates of the very first child widget.
I believe it's Qt behavior itself, not just Qt Designer issue (not tested yet). But I can't work further even if it's shown in Designer only: I need to have pixel-exact view while designing.
Of course, every spacing and margin of every component in form set to 0.
Manual coordinates assigning (from code) eliminates the problem of course, but I need to generate code by uic.
So, my question is: how to avoid such spacings? Fixing Qt core sources can be (hard) option too, since anyway we recompile Qt for the project.
Mirror post on Qt forums
Thanks.
Ilia.
If you select Form > View Code, you can see that the geometry is not actually used for widgets which are inside a layout. So the numbers you see in the Property Editor are purely informational and have no relevance to the eventual code that is generated from the ui file (which is why they are greyed out).
The one pixel offset is there because Qt Designer needs space to draw the red boxes around layouts. They have to be be represented somehow, so I don't see how this can be avoided given the way Qt Designer currently works. If you want a more accurate reprentation of the final results, I suppose you will have to show a preview.
There is a facility in Settings > Preferences > Embedded Design that allows you to specify device profiles (which determine things like style, font, and screen resolution). This will add a new entry to the Preview In menu, which should allow you to refine the accuracy of the previews even further.

How to create a text editor in with line numbers in a web app

I'm trying to create a text editor with line numbers, which increments with the lines increase. Well, my focus is to make the UI that will do good in Firefox OS as a privilege app. But in UI what css and html need to be used to create a text-field where line numbers must not be editable by the user. And few other thing say like, text-field is fixed height height: 100px; now if text overflows and if the user scroll then line numbers must scroll together with respective lines. (I'm trying to create with textarea and div with contenteditable="true"). I'm not able to scroll the text-field if I try this. Please provide some help or any other way to do this.
As someone who has worked on this problem for over a year at a previous company. Just use one of the existing source code editors like Ace or CodeMirror. They'll work in a Firefox OS app as well (f.e. Cloud9 IDE uses Ace and works on FFOS).

Resources